home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / comm / net / tf02.lha / TinyFugue / tf-lib / tf-help < prev    next >
Text File  |  1995-08-12  |  172KB  |  5,276 lines

  1. @warranty
  2. @copy
  3. @copying
  4. @copyright
  5.  
  6.   TinyFugue - programmable mud client
  7.   Copyright (C) 1993, 1994, 1995 Ken Keys
  8.  
  9.   Regexp package is Copyright (c) 1986 by University of Toronto.
  10.  
  11.   For bug reports, questions, suggestions, etc., I can be reached by
  12.   email at hawkeye@tcp.com.  For problems specific to the OS/2 version,
  13.   contact a.sahlbach@tu-bs.de.  Please read "/help bugs" before sending
  14.   a bug report.
  15.  
  16.   This program is free software; you can redistribute it and/or modify
  17.   it under the terms of the GNU General Public License as published by
  18.   the Free Software Foundation; either version 2 of the License, or
  19.   (at your option) any later version.
  20.  
  21.   This program is distributed in the hope that it will be useful,
  22.   but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.   GNU General Public License for more details.
  25.  
  26.   You should have received a copy of the GNU General Public License
  27.   along with this program; if not, write to the Free Software
  28.   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29.  
  30. #sites
  31. #find
  32. #where
  33. #www
  34. #ftp
  35.   The latest version of TinyFugue can always be found at:
  36.  
  37.      ftp://ftp.tcp.com/pub/mud/Clients/tinyfugue/
  38.      ftp://tf.tcp.com/pub/tinyfugue/
  39.  
  40.   Other ftp sites may not have the latest version.
  41.  
  42.   Also see http://www.tcp.com/hawkeye/tf.html for the latest info on TF.
  43.  
  44. @summary
  45.  
  46. Type "/help intro" for basic information on using TF.
  47. Type "/help topics" for a list of other help topics.
  48. Type "/help commands" for a complete list of TF    builtin    commands.
  49. Type "/help help" for instructions on using /help.
  50.  
  51. If you are having problems with    TF and wish to contact the author, type
  52. "/help problems".
  53.  
  54. If you are having trouble reading the help sections because text is
  55. scrolling off the screen, try typing "/more on"    before /help, and
  56. then press TAB at a "--More--" prompt when you're ready to continue.
  57.  
  58. @intro
  59. @me
  60. @newbie
  61. @tinyfugue
  62. @introduction
  63.  
  64.   TinyFugue is a MUD client.  It helps you connect to a MUD, in a much
  65.   more convenient manner than telnet.
  66.  
  67.   You can connect to a mud world using the same syntax as you would
  68.   with telnet:  "tf <host> <port>".  Or, while running tf, you can use
  69.   "/connect <host> <port>".  To make things easier, you can give names to
  70.   worlds, using /addworld, and then use "tf <name>" and "/connect <name>".
  71.   If you store a set of /addworld commands in a file, TF can read them
  72.   automatically when it starts.  You can even connect to more than one
  73.   world at the same time, and switch between them.  See:  /connect, /fg,
  74.   /addworld, worlds, tfrc.
  75.  
  76.   Any line you type that starts with a single '/' is a tf command.
  77.   Anything else you type will be sent to the mud.  See:  interface,
  78.   commands.
  79.  
  80.   You can define your own tf commands, called macros.  The simplest
  81.   type of macro is just an abbreviation or alias for a longer
  82.   command or commands.  But macros can also perform much more
  83.   powerful tasks.  See:  macros, /def.
  84.  
  85.   You can tell tf to watch for certain patterns in the text from the
  86.   mud, and then do special things when it sees that pattern:  display
  87.   the text in a special way (hilite); not display the text at all
  88.   (gag); execute a macro command (trigger); or do any combination of
  89.   these.  See:  hilites, triggers, /hilite, /gag, /trig, /def.
  90.  
  91.   In visual mode, TF will split the screen into two windows: one for
  92.   input, and one for output.  TF will display useful information on the
  93.   line separating the two windows, such as the name of the foreground
  94.   world.  To use it, just type "/visual on".  See: %visual.
  95.  
  96.   TF keeps a history of every line it prints, every sent by the mud,
  97.   and every command you enter.  You can see those histories using
  98.   /recall.  You can also have this text saved in a file using /log.
  99.   See: history, /recall, /log.
  100.  
  101.   See also:  topics
  102.  
  103. @topics
  104.  
  105.   Topics marked with + are new; those marked with * have changed since
  106.   the last version.  Many topics also have subtopics that are not listed
  107.   here (e.g., individual variables, hooks, and functions).
  108.  
  109.   copying    - copyright; no warranty     intro        - introduction to tf
  110.   startup    - how to start tf         tfrc        - personal config file
  111.  *interface  - how input works         visual        - split-screen mode    
  112.   commands   - list of commands         macros     - user-defined commands
  113.   worlds     - defining worlds         sockets    - world connections
  114.   patterns   - pattern matching         history    - recall and logging
  115.   variables  - state and environment     globals    - special tf variables
  116.   attributes - special text display      color      - terminal color codes
  117.   priority   - trigger/hook selection     expansion  - macro body execution    
  118.   prompts    - using LP/Diku prompts     protocol   - LP/Diku prompt protocol
  119.   problems   - bugs, core dumps, etc.    *expressions- math & string operations
  120.  
  121.   utilities  - useful extra command files
  122.   triggers   - automatic command execution based on incoming text
  123.  *hooks         - automatic command execution based on tf events
  124.   library    - macros and variables in stdlib.tf
  125.   processes  - timed commands and command quoting
  126.  *subs       - arithmetic, command, macro, and variable substitutions
  127.  *functions  - special expression operations
  128.   hints         - some hints and style tips for macro programming
  129.  +proxy      - connecting to outside hosts via a proxy server (firewall)
  130.  
  131. @builtins
  132. @commands
  133. @index
  134.  
  135. Commands marked    with '+' are new in this version.  Commands marked with    '*'
  136. have changed since the last version.
  137.  
  138.   ADDWORLD      FG            LISTWORLDS    RESTRICT      UNBIND      
  139.   BAMF          FOR           LOAD          SAVE          UNDEF       
  140.   BEEP          GAG           LOG           SAVEWORLD     UNDEFN      
  141.  *BIND          GETFILE       NOGAG         SEND          UNDEFT      
  142.   BREAK         GRAB          NOHILITE      SET           UNHOOK      
  143.   CAT           HELP          PARTIAL       SETENV        UNSET       
  144.   CHANGES       HILITE        PASTE         SH            UNTRIG      
  145.  *CONNECT       HISTSIZE      PROMPT        SHIFT         UNWORLD     
  146.   DC            HOOK         *PS            SUB           VERSION     
  147.   DEF           IF            PURGE         SUBSTITUTE    WATCHDOG    
  148.   DOKEY         INPUT         PURGEWORLD    SUSPEND       WATCHNAME   
  149.   ECHO          KILL          PUTFILE       TELNET        WHILE       
  150.   EDIT          LCD           QUIT          TEST          WORLD       
  151.   ESCAPE        LET          *QUOTE         TIME                      
  152.  *EVAL/NOT      lisp          RECALL        TOGGLE                    
  153.   EXPORT        LIST          RECORDLINE    TRIG                      
  154.   EXPR         *LISTSOCKETS   REPEAT        TRIGGER                   
  155.  
  156.   See also: intro, topics
  157.  
  158. @/addtiny
  159. @/addlp
  160. @/addlpp
  161. @/adddiku
  162. @/addtelnet
  163.  
  164.   The comamnds /addtiny, /addlp, /addlpp, /adddiku, and /addtelnet take
  165.   the same arguments as /addworld, and also give that world a type.
  166.   A world's type determines the format for automatic login and flag
  167.   settings.
  168.  
  169.   See: /addworld
  170.  
  171. @/addworld
  172.  
  173.   Usage:
  174.  
  175.   /ADDWORLD [-T<type>] <name> [<char> <pass>] <host> <port> [<file>]
  176.   /ADDWORLD [-T<type>] default <char> <pass> [<file>]
  177.   /ADDWORLD [-T<type>] <name>
  178.   ___________
  179.  
  180.   Adds a new world with the name <name>, or defines the default
  181.   character and password.  Any omitted fields will assume the values of
  182.   the corresponding fields of world "default", if there is one.  The
  183.   third form, "/addworld -T<type> <name>", can be used to change the
  184.   type of an existing world.
  185.  
  186.   The optional <type> is used in hooks and triggers, and for automatic
  187.   login and flag setting.  The library pre-defines WORLD and LOGIN
  188.   hooks for these types:
  189.  
  190.     (none)        TinyMud login format.
  191.  
  192.     tiny, tiny.*    TinyMud login format, lp=off, always_echo=off.
  193.  
  194.     lp, lp.*        LP/Diku login format, lp=on, always_echo=off.
  195.     diku, diku.*    For any server that sends unterminated prompts.
  196.     aber, aber.*
  197.  
  198.     lpp, lpp.*        LP/Diku login format, lp=off, always_echo=off.
  199.             For muds that use GOAHEAD or EOR prompt protocol.
  200.  
  201.     telnet, telnet.*    telnet login format, lp=on, always_echo=on.
  202.             For any line-by-line telnet service.
  203.  
  204.   You can define your own world types for use in other triggers or
  205.   hooks.  If you use names that match the (glob) patterns above, the
  206.   standard library hooks will still work.  For example, if you did:
  207.  
  208.     /addworld -T"tiny.muck" Cave     <name> <pass> cave.tcp.com 2283
  209.     /addworld -T"tiny.muck" QWest    <name> <pass> glia 9999
  210.     /addworld -T"tiny.mush" DeepSeas <name> <pass> muds.okstate.edu 6250
  211.  
  212.   then tiny-style autologin would still work (using the library hooks),
  213.   and you could also define your own triggers and hooks specific to
  214.   TinyMUCKs or TinyMUSHes.
  215.  
  216.   Any <type> is valid, but is only useful if a hook or trigger
  217.   matches it.
  218.  
  219.   Redefining the default world is permitted.  Those worlds previously
  220.   defined without character, password or macro file strings will then
  221.   use the new default.
  222.  
  223.   If %{proxy_host} is defined, connections will go through a proxy server
  224.   (i.e., firewall).  See "/help proxy" for details.
  225.  
  226.   See: worlds, /connect, /fg, /telnet
  227.  
  228. @/unalias
  229. @/alias
  230.  
  231.   Usage:
  232.  
  233.   /REQUIRE alias.tf
  234.  
  235.   /ALIAS [<name> [<command>]]
  236.   /UNALIAS <name>
  237.   ___________
  238.  
  239.   With no arguments, /alias lists all aliases.  With a <name> argument,
  240.   /alias lists the alias for <name>.  Otherwise, /alias defines <name>
  241.   as an alias for <command>.
  242.  
  243.   /Unalias undefines an alias for <name> that was defined with /alias.
  244.  
  245.   To use an alias, just type its name followed by any optional arguments.
  246.   Unlike macros defined with /def, you do not type '/' before <name> to
  247.   execute an alias.  Argument substitution in aliases works the same as
  248.   in macros.
  249.  
  250.   Note:  an alias can not be called from a macro or another alias.  Use
  251.   macros instead.
  252.  
  253.   Using /def instead of /alias is recommended.
  254.  
  255.   See: /def, macros, substitution, tfrc
  256.  
  257. @/at
  258.  
  259.   Usage:
  260.  
  261.   /REQUIRE at.tf
  262.  
  263.   /AT <when> <commands>
  264.   ___________
  265.  
  266.   <commands> will be executed at <when>, which must be of the form
  267.   "hh:mm" or "hh:mm:ss" ("hh" is between 0 and 23).  <when> is within
  268.   the next 24 hours.
  269.  
  270.   Example:  /at 23:30 /echo Stop mudding, it's time for Letterman!
  271.  
  272.   See: processes, /repeat, /quote
  273.  
  274. @/bamf
  275.  
  276.   Usage:
  277.  
  278.   /BAMF    [OFF|ON|OLD]
  279.   ___________
  280.  
  281.   Sets the flag    %{bamf}.  This flag controls whether TF    will cooperate
  282.   with portals.  A portal allows a mud character to move from one
  283.   server to another transparently, by simply going through a seemingly
  284.   normal mud exit.
  285.  
  286.   How it works:  A "portal" is text sent by a server of the form:
  287.  
  288.   #### Please reconnect    to <name>@<addr> (<host>) port <port> ####
  289.  
  290.   For example:
  291.  
  292.   #### Please reconnect    to Islandia@128.100.102.51 (hawkwind.utcs.toronto.edu)
  293.     port 2323 ####
  294.  
  295.   If %{bamf} is off, lines in this format have no effect.  If %{bamf} is
  296.   on, Fugue will attempt to use    the portal as an UnterMUD portal:  it
  297.   will disconnect from the current world, and attempt to connect to the
  298.   new world; if    the %{login} flag is also on, TF will try to log in to
  299.   the new world    using the name and password from the current world.
  300.   If bamf is "old", Fugue will connect to the new world    without
  301.   disconnecting    from the current world.     If %{login} is also on, and the
  302.   new world has    been defined with a name and password in an /addworld
  303.   command, Fugue will attempt to log in    automatically.
  304.  
  305.   The flag %{bamf} defaults to 0 (off).
  306.  
  307.   See: worlds, sockets,    %bamf, %login
  308.  
  309. @/beep
  310.  
  311.   Usage:
  312.  
  313.   /BEEP    [<number>|ON|OFF]
  314.   ___________
  315.  
  316.   /beep    causes Fugue to    emit <number> beeps (ASCII 7).    /beep with no
  317.   arguments will emit three beeps.  /beep OFF causes Fugue to ignore
  318.   further calls    to /beep until a /beep ON is performed.
  319.  
  320. @/bind
  321.  
  322.   Usage:
  323.  
  324.   /BIND    <sequence> = <command>
  325.   ___________
  326.  
  327.   Creates a macro that will be executed    when <sequence>    is typed at the
  328.   keyboard.  The <sequence> may    use ^<key> notation for    a control key,
  329.   and \<number>    for an ascii character code in octal, hexadecimal, or
  330.   decimal.  For    example, the escape character can be given by any of
  331.   these    forms:    ^[, \033, \0x1B, or \27.
  332.  
  333.   When the key sequence    <sequence> is typed at the keyboard, <command>
  334.   is executed.    The command is actually    a macro    body, so all the
  335.   substitutions    described under    "expansion" will be performed.  The
  336.   most common command used with a key binding is /dokey.
  337.  
  338.   At startup, TF defines bindings for /dokey BSPC, BWORD, DLINE,
  339.   REFRESH, LNEXT, UP, DOWN, RIGHT, and LEFT based on your terminal
  340.   settings.  Also, the standard    macro library defines a    set of
  341.   (invisible) default bindings,    one for    each of    the /dokey functions.
  342.  
  343.   If /bind fails for any reason, it returns 0.  Otherwise, it returns
  344.   the number of the new macro (useful in /undefn and /edit).
  345.  
  346.   As of version 3.5, the character ^@ is allowed in keybindings.
  347.  
  348.   The command
  349.     /bind <sequence> = <command>
  350.   is equivalent    to
  351.     /def -b<sequence> = <command>.
  352.  
  353.   Examples:
  354.  
  355.   /bind ^Xtw = :jumps to the left%;:steps to the right!
  356.   /bind ^[q = /set more off
  357.   /bind ~ky = /input Kyosuke
  358.  
  359.   See: keys, /dokey, /unbind, /input, utilities (bind-bash, bind-emacs,
  360.        completion), general
  361.  
  362. @/break
  363.  
  364.   Usage:
  365.  
  366.   /BREAK [<n>]
  367.   ___________
  368.  
  369.   During macro evaluation, /BREAK unconditionally terminates the
  370.   nearest enclosing /WHILE loop.  If <n> is specified, it will break
  371.   out of <n> enclosing /WHILE loops.  If used outside a /WHILE loop,
  372.   the macro evaluation is terminated.
  373.  
  374.   See: /while, expansion
  375.  
  376. @/cat
  377.  
  378.   Usage:
  379.  
  380.   /CAT [%]
  381.   ___________
  382.  
  383.   Concatenates (puts together) all subsequent lines until a line containing
  384.   a single "." is typed.  If the argument "%" is given, a "%;" sequence is
  385.   appended to each intermediate line.  The concatenated result is then
  386.   executed as a single line.
  387.  
  388.   The concatenated result is stored in the input history as a single
  389.   line, so intermediate lines can not be recalled seperately.
  390.  
  391.   Example:
  392.  
  393.   /cat %
  394.   :foo
  395.   :bar
  396.   :baz
  397.   .
  398.  
  399.   This produces:
  400.   :foo%;:bar%;:baz
  401.  
  402.   If the %{sub}    flag is    set on,    this will expand to three lines    ":foo",
  403.   ":bar" and ":baz" and    be sent    to the socket.
  404.  
  405.   See: general,    history, /sub
  406.  
  407. @/changes
  408.  
  409.   Usage:
  410.  
  411.   /CHANGES [<version>]
  412.   ________
  413.  
  414.   List the changes in a <version> of TinyFugue; if omitted, <version>
  415.   defaults to the current version.  <Version> can be a full version
  416.   name (e.g., "3.4 beta 1") or just the major and minor numbers (e.g.,
  417.   "3.4").  The information is kept in the file %TFLIBDIR/CHANGES.
  418.  
  419.   See: /version
  420.  
  421. @/complete
  422. @completion_list
  423. @completion
  424.  
  425.   Usage:
  426.  
  427.   /REQUIRE completion.tf
  428.  
  429.   /complete
  430.   ________
  431.  
  432.   Loading completion.tf will define the following keybindings:
  433.  
  434.   ESC TAB    complete from context, input history, or %{completion_list}.
  435.   ESC ;        complete from %{completion_list}.
  436.   ESC i        complete from input history.
  437.   ESC /        filename completion.
  438.   ESC @        hostname completion.
  439.   ESC %        variable name completion.
  440.   ESC ^W    world name completion.
  441.  
  442.   To use them, type part of a word, type one of the keybindings, and
  443.   the rest of the word will be filled in for you automagically.  ESC TAB
  444.   attempts to figure out from context what kind of completion you want;
  445.   the other bindings do more explicit completions.
  446.  
  447.   By "from context", I mean it will look for patterns and decide which
  448.   type of completion to use.  For example, if the line begins with "/load",
  449.   it will use filename completion; if the word begins with "%" or "%{", it
  450.   will use variable name completion; etc.
  451.  
  452.   The "ESC TAB" and "ESC ;" bindings will use the %{completion_list}
  453.   variable, in which you can store a list of any words you want to be
  454.   able to complete.
  455.  
  456.   You can also define your own types of completion.  See the comments
  457.   in the completion.tf file for more information.
  458.  
  459.   See: /bind, tfrc
  460.  
  461. @/connect
  462.  
  463.   Usage:
  464.  
  465.   /CONNECT [-lq] [<world>]
  466.   /CONNECT <host> <port>
  467.   ___________
  468.  
  469.   Attempts to open a socket connected to <world>.  <world> must be
  470.   defined by the /addworld command and not already connected.  If
  471.   <world> is omitted, the first defined world will be used.  "/connect
  472.   <host> <port>" will define a temporary world with the given address,
  473.   and try to connect to it.
  474.  
  475.   Options:
  476.  
  477.     -l    Do not log in automatically (i.e., don't call the LOGIN hook).
  478.     -q    Quiet login (overrides %{quiet} flag).
  479.  
  480.   When successfully connected to a new socket, these events occur:
  481.     1. If %{sockmload} is on and there is a file associated with the world,
  482.     the file will be loaded (and the LOAD hook will be called);
  483.     2. The CONNECT hook is called.
  484.     3. The new socket is brought into the foreground.  (This is actually
  485.     done by /fg in a CONNECT hook defined by the standard library.)
  486.     4. If %{login} is on, and a character and password is defined, the LOGIN
  487.     hook is called.
  488.  
  489.   When a hostname is given, TF must resolve it to an IP address.  If
  490.   %{gethostbyname} is "nonblocking", and this process takes too long, TF
  491.   will print "Hostname resolution for <world> in progress" (the PENDING
  492.   hook) and continue to work in the background, leaving you free to do other
  493.   things.  If the resolution succeeds, TF will try to connect; if it fails,
  494.   you will be notified.
  495.  
  496.   Nonblocking connect, on most platforms:  If the connection takes too
  497.   long, TF will print "Connection to <world> in progress" (the PENDING
  498.   hook) and continue to try to connect in the background, leaving you
  499.   free to do other things.  If the connection eventually succeeds, you
  500.   will be switched to that socket (but see note below); if it fails,
  501.   you will be notified.
  502.  
  503.   When a pending /connect succeeds, the foregrounding is done by a
  504.   CONNECT hook defined by the standard library.  If you don't want to
  505.   switch automaticly, you can either delete the default hook (/unhook
  506.   CONNECT) or define your own (with a priority higher than 0).  If you
  507.   define your own but you still want the switch to occur, you must
  508.   either make it a fall-thru hook, or explicitly call "/fg %1" from
  509.   your hook.
  510.  
  511.   /connect returns 0 on error or failure, 1 on success, or 2 if the
  512.   connection is pending.
  513.  
  514.   See: worlds, sockets,    /world, /addworld, /fg, %login, %gethostbyname, hooks
  515.  
  516. @/dc
  517.  
  518.   Usage:
  519.  
  520.   /DC [<world>|-ALL]
  521.   ___________
  522.  
  523.   Disconnects from the named world, or the current world if no world is
  524.   given, or all    worlds if "-all" is given.  If the flag    %{quitdone} is
  525.   on, and /dc disconnects the last socket, TF will exit.
  526.  
  527.   See: sockets,    %quitdone
  528.  
  529. @/def
  530.  
  531.   Usage:
  532.  
  533.   /DEF [<options>] [<name>] [= <body>]
  534.   ___________
  535.  
  536.   Defines a macro with an optional trigger and hook associated with
  537.   it.  The options and their meanings are:
  538.  
  539. #-msimple
  540. #-mglob
  541. #-mregexp
  542. #-m
  543.     -m<matching>  Determines which matching style should be used for
  544.           the -t, -h, and -T options.  Valid values are
  545.           "simple", "glob", and "regexp" (see also: patterns).
  546.           If omitted, the value of %{matching} ("glob" by
  547.           default) is used, unless -P is also given, in which
  548.           case "regexp" is used.
  549.  
  550. #-n
  551.     -n<shots>      The macro is a multi-shot, that is, it will be deleted
  552.           after    it is triggered    or hooked <shots> times.  A value
  553.           of 0 makes the macro permanent.  Default: 0.
  554.  
  555. #-t
  556.     -t<pattern>      Defines a trigger pattern which will cause the macro
  557.           to be    called.     <pattern> may be enclosed in quotes
  558.           (", ', or `); if so, quotes within the pattern must be
  559.           preceeded with a '\'.  Default: no trigger.
  560.  
  561. #-h
  562.     -h"<event> [<pattern>]"
  563.           Specifies that the macro will    be called automatically
  564.           whenever <event> occurs and its arguments match
  565.           <pattern>.  <event> may be a single event name or a
  566.           list separated by '|'.  If <pattern> is omitted, it
  567.           will match any arguments, and the quotes may also be
  568.           omitted.  Default: no    hook.
  569.  
  570. #-b
  571.     -b<bind>      The macro will be called when    the sequence <bind>
  572.           is typed at the keyboard.  Default:  no binding.
  573.           The <bind> string may    contain    the special codes
  574.           described under "bind".
  575.  
  576. #-p
  577.     -p<pri>      Sets the priority of the macro's trigger or hook
  578.           to <pri>.  Default: 1.  See also: fall-thru.
  579.  
  580. #-c
  581.     -c<chance>      Sets the percent probability of a trigger execution.
  582.           Default: 100%.
  583.  
  584. #-w
  585.     -w<world>      If the macro has a trigger or hook, it can be matched
  586.           only by text or events from <world>.  Default: any world.
  587.  
  588. #-T
  589.     -T<type>      If the macro has a trigger or hook, it can be matched
  590.           only by text or events from worlds of type <type>.
  591.           Default: any type.  (See: /addworld).
  592.  
  593. #-F
  594.     -F          Fall-thru:  on a trigger or hook, allows additional matches
  595.           of lower priority to be run.    Default: not fall-thru.
  596.           See: priority
  597.  
  598. #-a
  599.     -a[ngGurfdBbhC]
  600.           Set attribute(s) (normal, gag, norecord, underline,
  601.           reverse, flash, dim, bold, bell, hilite, Color) used
  602.           to display text matched by the trigger or to display
  603.           the default message of a hook.  Default: normal.
  604.           See "attributes".
  605.  
  606. #-P
  607.     -P[<n>][nurfdBhC]
  608.           "Partial hilite": Set attribute(s) used to display text
  609.           matched by the <n>th parenthesized subexpression in
  610.           a regexp trigger.  If <n> is omitted it defaults to 0,
  611.           i.e. the text matched by the entire regexp.  If there are
  612.           multiple matches in the text, the attributes will be
  613.           applied to all of them.  Implies -mregexp.  Only one
  614.           -P option is allowed per macro.
  615.  
  616. #-f
  617.     -f          Same as -a, for backward compatibility.
  618.  
  619. #-I
  620. #-i
  621.     -i          Marks    the macro as "invisible".  Invisible macros
  622.     -I          are not processed by /list, /save, or    /purge unless
  623.           forced.  Default: not    invisible.
  624.  
  625. #-1
  626.     -1          Defines a one-shot.  Equivalent to "-n1".
  627.  
  628. #
  629.     <name>      The name of the macro.  Default: no name.  Names
  630.           should begin with a letter, and contain letters,
  631.           numbers, or '_' characters.  This is not enforced,
  632.           but other characters (especially '$',    '/', and '%')
  633.           may cause unwanted interpretations during expansion.
  634.  
  635.     = <body>      Text to be executed when macro is called.  Default:
  636.           no body.
  637.  
  638.   If /def could not create a new macro, it returns 0.  Otherwise, it
  639.   returns the number of the new macro (useful with /undefn and /edit).
  640.  
  641.   Example:
  642.  
  643.   /def -mregexp -p2 -t"^Joe goes ([a-z]*)\.$" follow_joe = go %P1
  644.  
  645.   This will create a macro named "follow_joe" with a regexp trigger.
  646.   When a line like "Joe goes north." is seen, follow_joe will expand
  647.   "%P1" to the text matched by the first set of parentheses (in this
  648.   case, "north"), and execute the command "go north".
  649.  
  650.   /def is sufficient to    perform    all the    functions of the /trig,    /trigp,
  651.   /trigc, /trigpc, /gag, /hilite, /partial, /hook, and /bind commands.
  652.  
  653.   See: macros, triggers, patterns, hooks, priority, expansion, attributes,
  654.       /undef, /undefn, /purge, /list, /save, /load
  655.  
  656. @/dokey
  657.  
  658.   Usage:
  659.  
  660.   /DOKEY <name>
  661.   ___________
  662.  
  663.   Executes the function of the edit key <name>.  Most of the edit
  664.   key functions are not meaningful when the /dokey command is executed
  665.   from the regular command line, but are intended to be called from
  666.   a keybinding created with /bind or /def -b.
  667.  
  668.   Name        Default binding      Function
  669.   ___________________________________________________________________
  670. #bs
  671. #backspace
  672. #bspc
  673.   BSPC        (stty), ^H, ^?      Backspace
  674. #bword
  675.   BWORD        (stty), ^W      Delete previous word
  676. #dline
  677.   DLINE        (stty), ^U      Delete entire line
  678. #refresh
  679.   REFRESH    (stty), ^R      Refresh line
  680. #lnext
  681.   LNEXT        (stty), ^V      Ignore any binding next key might have
  682. #
  683.  
  684. #up
  685.   UP        (termcap), ^[[A      Cursor up
  686. #down
  687.   DOWN        (termcap), ^[[B      Cursor down
  688. #right
  689.   RIGHT        (termcap), ^[[C      Cursor right
  690. #left
  691.   LEFT        (termcap), ^[[D      Cursor left
  692. #
  693.  
  694. #return
  695. #newline
  696.   NEWLINE    ^J, ^M          Execute current line
  697. #recallb
  698.   RECALLB    ^P          Recall previous input line
  699. #recallf
  700.   RECALLF    ^N          Recall next input line
  701. #recallbeg
  702.   RECALLBEG    ^[<          Recall first input line
  703. #recallend
  704.   RECALLEND    ^[>          Recall last input line
  705. #searchb
  706.   SEARCHB    ^[p          Search backward in input history
  707. #searchf
  708.   SEARCHF    ^[n          Search forward in input history
  709. #socketb
  710.   SOCKETB    ^[b          Switch to previous socket
  711. #socketf
  712.   SOCKETF    ^[f          Switch to next socket
  713. #dword
  714.   DWORD        ^[d          Delete word
  715. #del
  716. #delete
  717. #dch
  718.   DCH        ^D          Delete character under cursor
  719. #redraw
  720.   REDRAW    ^L          Clear/redraw screen
  721. #home
  722.   HOME        ^A          Go to beginning of line
  723. #end
  724.   END        ^E          Go to end of line
  725. #wleft
  726.   WLEFT        ^B          Go left, to beginning of word
  727. #wright
  728.   WRIGHT    ^F          Go right, to end of word
  729. #deol
  730.   DEOL        ^K          Delete from cursor to end of line
  731. #page
  732.   PAGE        ^I          Scroll 1 page ("more")
  733. #hpage
  734.   HPAGE        ^[h          Scroll half page ("more")
  735. #line
  736.   LINE        ^[l          Scroll 1 line ("more")
  737. #flush
  738.   FLUSH        ^[j          Discard all queued lines.
  739. #selflush
  740.   SELFLUSH    ^[J          Discard queued lines without attributes.
  741. #
  742.  
  743.   Default sequences for BSPC, BWORD, DLINE, REFRESH, and LNEXT are
  744.   those used by your terminal driver.  Default sequences for UP, DOWN,
  745.   RIGHT, and LEFT are taken from the termcap entry for your TERM.
  746.  
  747.   The return value of /dokey depends on the function.  The movement and
  748.   deletion functions return the new position of the cursor.  The return
  749.   values of other functions aren't very useful.
  750.  
  751.   Warning:  TF will become essentially useless if there    is no key bound
  752.   to /dokey NEWLINE.
  753.  
  754.   See "keys" for a complete list of keybindings.
  755.  
  756.   Example:
  757.  
  758.   /bind    ^? = /dokey BSPC
  759.   /bind    ^H = /dokey BSPC
  760.  
  761.   Both ^H and DEL could    then be    used to    do backspacing (this is already
  762.   done by default).
  763.  
  764.   See: keys, general, sockets, history, /bind, /more
  765.  
  766. @/echo
  767.  
  768.   Usage:
  769.  
  770.   /ECHO    [-a<attrs>] [-w[<world>]] <text>
  771.   ___________
  772.  
  773.   Locally echoes <text> to the screen or output window.  Line attributes
  774.   may be given with the -a option.  If "-w<world>" is given, <text>
  775.   will be handled as if it came from <world>:  it will be stored in the
  776.   history of <world>, and if <world> is not the foreground world <text>
  777.   will not be displayed until <world> is brought into the foreground.
  778.   If "-w" is given, with no <world>, the current world is assumed.
  779.  
  780.   Remember that    "- " can be used to mark the end of options, in    case
  781.   <text> begins    with "-".
  782.  
  783.   See: attributes, worlds
  784.  
  785. @/edit
  786.  
  787.   Usage:
  788.  
  789.   /EDIT    [<options>] [<name>] [=    <body>]
  790.   ___________
  791.  
  792.   Edits    a currently existing macro or the trigger associated with a
  793.   macro.  Options are described    under "def".  The name of the macro must
  794.   be specified and cannot be changed, with the following two exceptions:
  795.  
  796.   1. The macro name can    be specified as    "#<num>" where <num> is    the
  797.   number of the    macro instead of the name.  A macro number can be
  798.   determined by    listing    the macro with /list.
  799.  
  800.   2. The macro name can    be specified as    "$<pattern>" where <pattern>
  801.   is the trigger pattern.  You may still change    the pattern if this is
  802.   used to locate the macro.
  803.  
  804.   In either case, the name cannot be changed.  It is possible to
  805.   create a macro which changes the name    of a macro, if it does not
  806.   have any options other than a    name and a body:
  807.  
  808.     /def rename = /def %2 =    $%1%; /undef %1
  809.  
  810.   How this works is discussed in the help section "expansion".
  811.  
  812.   The -i flag will be cleared from the macro if it is not explicitly
  813.   given with /edit.  It is not possible to clear the -F option.  The
  814.   -t, -w, and -T options also can not be cleared, but their arguments
  815.   can be changed.  Any options that are not specified with /edit will
  816.   remain unchanged (with the exception of -i).
  817.  
  818.  
  819.   Example:
  820.  
  821.   /def -p2 -c75    -t"* has arrived." -ah greet = :greets %1
  822.   /edit    -c0 greet
  823.  
  824.   The second command will change the probability of /greet's trigger
  825.   from 75% to 0%, effectively turning it off.
  826.  
  827.   See: macros, triggers, patterns, expansion, attributes, /def, /list
  828.  
  829. @/escape
  830.  
  831.   Usage:
  832.  
  833.   /ESCAPE <metacharacters> <string>
  834.   ___________
  835.  
  836.   Echoes <string>, but any <metacharacters> contained in <string> will
  837.   preceeded by a '\' character.
  838.  
  839.   Example:
  840.  
  841.   /def blue = /def -aCblue -t"$(/escape " %*)"
  842.   /blue * pages, "*"
  843.  
  844.   When the second command executes, it will expand to:
  845.   /def -aCblue -t"* pages, \"*\""
  846.  
  847.   See: expansion
  848.  
  849. @/not
  850. @/eval
  851.  
  852.   Usage:
  853.  
  854.   /EVAL    <command>
  855.   /NOT <command>
  856.   ___________
  857.  
  858.   Macro    body expansion is performed on <command>, and <command>    is
  859.   executed.  The return value of /eval is that of <command>; the
  860.   return value of /not is the logical negation of the return value of
  861.   <command>.
  862.  
  863.   Positional parameters (%1, etc) are inherited from the caller.
  864.  
  865.   Note:  calling /eval with arguments from a trigger could be dangerous.
  866.   If not written carefully, such a trigger could allow anyone with
  867.   access to the server to gain access to your tf or shell account (if
  868.   they have not been /restricted).
  869.  
  870.   Example:
  871.   command: /def showvar = /eval /echo %{1} is %%{%{1}}.
  872.   command: /showvar borg
  873.   output:  borg is on.
  874.  
  875.   Note:  Instead of /not, you should use the "/!command" syntax to execute
  876.   "/command" and negate its result.  /not evaluates its arguments, which
  877.   may be undesirable.
  878.  
  879.   See:    expansion
  880.  
  881. @/export
  882.  
  883.   Usage:
  884.  
  885.   /EXPORT <variable>
  886.   ___________
  887.  
  888.   If <variable> is an global variable, it becomes an environment
  889.   variable.  This makes <variable> available to the environment for
  890.   "/sh" and "/quote !".
  891.  
  892.   Local variables may not be exported.
  893.  
  894.   See: environment, variables, /setenv
  895.  
  896. @/expr
  897.  
  898.   Usage:
  899.  
  900.   /EXPR    <expression>
  901.   ___________
  902.  
  903.   Evaluates <expression> and prints its    value.    This is    a shorthand
  904.   for "/eval /echo -- $$[<expression>]".
  905.  
  906.   Example:
  907.  
  908.   command:  /set x=4
  909.   command:  /expr x * 2
  910.   output:   8
  911.  
  912.   See: expressions
  913.  
  914. @/fg
  915.  
  916.   Usage:
  917.  
  918.   /FG [-ns<>] [<world>]
  919.   ___________
  920.  
  921.   Bring the socket associated with <world> into the foreground.  The
  922.   <world> must already be connected with the /connect command.
  923.  
  924.   Options:
  925.   -n    no socket: put all sockets in background.
  926.   -s    silent: don't print error messages on failure.
  927.   -<    previous socket in cycle.
  928.   ->    next socket in cycle.
  929.   -l    ignored.
  930.   -q    ignored.
  931.  
  932.   /fg returns 0 on failure, nonzero otherwise.
  933.  
  934.   If successful, /fg invokes the WORLD hook, which by default echoes
  935.   "---- World <world> ----" or "---- No world ----".
  936.  
  937.   See: /connect, worlds, sockets
  938.  
  939. @/for
  940.  
  941.   Usage:
  942.  
  943.   /FOR <variable> <start> <end>    <commands>
  944.   ___________
  945.  
  946.   The <variable> will take on all numeric values between <start>
  947.   and <end>, inclusive.     The <commands>    will be    executed once for
  948.   each of the values.  If <end>    is less    then <start>, <commands>
  949.   will not be executed.
  950.  
  951.   Example:
  952.  
  953.   /for i 0 9 say $[10 - i]
  954.   would cause you to execute the commands "say 10", "say 9", ... "say 1".
  955.  
  956.   See: /while
  957.  
  958. @/gag
  959.  
  960.   Usage:
  961.  
  962.   /GAG [<pattern> [=<response>]]
  963.   ___________
  964.  
  965.   Creates a macro which will trigger on text matching <pattern> and
  966.   prevent it from being displayed, optionally executing <response>.
  967.  
  968.   With no arguments, /gag sets the flag    %{gag} to 1 (on).  This    flag
  969.   enables the gag attribute on triggers.  It is    on by default.
  970.  
  971.   The matching style of the gag pattern is determined by %{matching}.
  972.   The priority of the gag is determined by %{gpri}.  These variables
  973.   are examined when the gag is defined, not when it is executed.
  974.  
  975.   Gagged lines from background worlds will not set the activity    indicator
  976.   on the status    line or    call the activity hook.
  977.  
  978.   If /gag does not create a new macro, it returns 0.  Otherwise, it
  979.   returns the number of the new macro (useful in /undefn and /edit).
  980.  
  981.   /gag <pattern> [= <response>]
  982.     is equivalent to
  983.   /def -ag -t"<pattern>" [= <response>].
  984.  
  985.   See: triggers, patterns, expansion, %gag, /def, /nogag
  986.  
  987. @download
  988. @/getfile_MUCK
  989. @/getfile_LP
  990. @/getfile_UNIX
  991. @/getfile
  992.  
  993.   Usage:
  994.  
  995.   /REQUIRE file-xfer.tf
  996.  
  997.   /GETFILE_MUCK <file> [<remote-file>]
  998.   /GETFILE_LP   <file> [<remote-file>]
  999.   /GETFILE_UNIX <file> [<remote-file>]
  1000.   ___________
  1001.  
  1002.   Downloads text <remote-file> from a MUCK, LP, or remote UNIX shell to
  1003.   <file> on the local host.  If <remote-file> is omitted, <file> is
  1004.   used as the name on both ends.
  1005.  
  1006.   When using /getfile_UNIX, an extra line of garbage may appear at the
  1007.   beginning of the downloaded file unless you first disable remote echo
  1008.   with "stty -echo".
  1009.  
  1010.   Bug:  if there is a log open for the current world, it will be closed
  1011.   by /getfile.
  1012.  
  1013.   See:  /putfile, /log
  1014.  
  1015. @/grab
  1016.  
  1017.   Usage:
  1018.  
  1019.   /GRAB    <text>
  1020.   ___________
  1021.  
  1022.   This command puts <text> into    the input buffer.  It is not really
  1023.   useful from the normal command line, but is quite useful when    called
  1024.   from a macro to redefine macros, or perhaps when bound to a key to
  1025.   speed    up part    of a line (macros allow    you to largely do what this
  1026.   would    allow, however).  Any text already in the input    buffer is
  1027.   discarded.
  1028.  
  1029.   Example:
  1030.  
  1031.   /def reedit =    /grab /edit %1 = $%1
  1032.  
  1033.   If you had previously    done "/def flail = :flails at his keyboard",
  1034.   the command "/reedit flail" would place "/edit flail = :flails at his
  1035.   keyboard" in the input buffer    and allow you to edit it using the editing
  1036.   keys.     See "expansion" for details on    how macros like    this work.
  1037.  
  1038.   See: /input, general
  1039.  
  1040. @/man
  1041. @/help
  1042.  
  1043.   Usage:
  1044.  
  1045.   /HELP    [<topic>]
  1046.   ___________
  1047.  
  1048.   Displays help    on the topic specified,    or displays a quick summary of
  1049.   available topics if no topic is given.
  1050.  
  1051.   The variable TFHELP must contain the name of the helpfile.  It is set
  1052.   when TF is installed, and should not normally be changed.  If the
  1053.   helpfile or the help index is not found, /help will not function.
  1054.  
  1055.   Commands are described with the format "/COMMAND arguments".    Words
  1056.   in all caps must be spelled exactly as shown.     Arguments in <> can be
  1057.   given    any value.  Arguments in [] may    be omitted.  The character | means
  1058.   "or".     For example, "[OFF|ON]" means you may type "off", "on", or nothing.
  1059.  
  1060.   See: index, intro, options
  1061.  
  1062. @/highlight
  1063. @/hilite
  1064.  
  1065.   Usage:
  1066.  
  1067.   /HILITE [<pattern> [=    <response>]]
  1068.   ___________
  1069.  
  1070.   Creates a macro which will trigger on text matching <pattern> and
  1071.   display it with the hilite attribute, optionally executing <response>.
  1072.  
  1073.   With no arguments, /hilite sets the flag %{hilite} to    1 (on).     This
  1074.   flag enables hilite and other    attributes on triggers.     It is on
  1075.   by default.
  1076.  
  1077.   The attribute(s) for hilited text are determined by the %{hiliteattr}
  1078.   variable.  The default is bold (hiliteattr=B).  Colors are also
  1079.   available (e.g., hiliteattr=Cgreen); see "attributes" and "color" for
  1080.   more information.
  1081.  
  1082.   The matching style of the hilite pattern is determined by %{matching}.
  1083.   The priority of the hilite is determined by %{hpri}.  These variables
  1084.   are examined when the hilite is defined, not when it is executed.
  1085.  
  1086.   If /hilite does not create a new macro, it returns 0.  Otherwise, it
  1087.   returns the number of the new macro (useful in /undefn and /edit).
  1088.  
  1089.   The standard library also defines /hilite_page and /hilite_whisper
  1090.   which    hilite several different commonly used page and    whisper    formats.
  1091.  
  1092.   /hilite <pattern> [=<response>]
  1093.     is equivalent to
  1094.   /def -ah -t"<pattern>" [=<response>].
  1095.  
  1096.   Example:
  1097.   /hilite {*} tried to kill you!
  1098.   With the default settings, any line matching that pattern will
  1099.   appear bold.
  1100.  
  1101.   See: triggers, patterns, attributes, /def, /nohilite, /partial
  1102.  
  1103. @/histsize
  1104.  
  1105.   Usage:
  1106.  
  1107.   /HISTSIZE [-lig] [-w[<world>]] [<size>]
  1108.   ___________
  1109.  
  1110.   Options:
  1111.     -l        local history
  1112.     -i        input history
  1113.     -g        global history (default)
  1114.     -w<world>    world history
  1115.  
  1116.   If <size> is not given, /histsize reports the maximum number of lines
  1117.   that can be stored in the specified history.
  1118.  
  1119.   If <size> is given, /histsize changes the maximum size of the
  1120.   specified history to <size>.  If the new size is less than the old
  1121.   size, lines will be lost.  If the new size is greater than the old
  1122.   size, then each subsequent new line will be added to the history
  1123.   until the new size is reached, instead of replacing existing lines.
  1124.  
  1125.   /histsize returns 0 for failure, and the size of the history otherwise.
  1126.  
  1127.   The %{histsize} variable can be used to set the default size of
  1128.   world histories before they are created.
  1129.  
  1130.   See:  history, %histsize
  1131.  
  1132. @/hook
  1133.  
  1134.   Usage:
  1135.  
  1136.   /HOOK    <event>    [<pattern>] [= <body>]
  1137.   /HOOK    [OFF|ON]
  1138.   ___________
  1139.  
  1140.   Creates a macro which    will execute <body> when <event> occurs    and the
  1141.   event's arguments match the optional <pattern>.  The <event> may be a
  1142.   single event or a list of events separated by    '|'.  If omitted,
  1143.   <pattern> will default to "*".
  1144.  
  1145.   /hook    with no    arguments displays the state of    the %{hook} flag.  /hook
  1146.   with an argument of ON or OFF    sets the %{hook} flag, which determines
  1147.   if hooks will    execute    their associated macros.
  1148.  
  1149.   The matching style of the hook pattern is determined by %{matching}.
  1150.   This variable is examined when the hook is defined, not when it is
  1151.   executed.
  1152.  
  1153.   Defining a hook will not replace an existing hook on the same    event,
  1154.   but rather creates an    additional hook    on the event.
  1155.  
  1156.   See the section "hooks" for details on hook operation, a list    of
  1157.   event    names, and examples.
  1158.  
  1159.   If /hook does not create a new macro, it returns 0.  Otherwise, it
  1160.   returns the number of the new macro (useful in /undefn and /edit).
  1161.  
  1162.   /hook <event> [<pattern>] [=<response>]
  1163.     is equivalent to
  1164.   /def -h"<event>[ <pattern>]" [=<response>].
  1165.  
  1166.   Example:
  1167.   /hook MAIL = /sh elm
  1168.   will automaticaly invoke "elm" to read mail when it arrives.
  1169.  
  1170.   See: hooks, macros, expansion, patterns, /def, /unhook
  1171.  
  1172. @/if
  1173. @/then
  1174. @/elseif
  1175. @/else
  1176. @/endif
  1177. @/if
  1178.  
  1179.   Usage:
  1180.  
  1181.   /IF (expr) list [ /ELSEIF (expr) list ]... [ /ELSE list ] /ENDIF
  1182.   /IF list /THEN list [ /ELSEIF list /THEN list ]... [ /ELSE list ] /ENDIF
  1183.   ___________
  1184.  
  1185.   <list> is any list of commands.  The return value of a <list> is the
  1186.   return value of the last command executed in the <list>.  Note that
  1187.   each <list> must be terminated by "%;".
  1188.  
  1189.   <expr> is any expression, and must be surrounded by parentheses.
  1190.  
  1191.   The <list> or <expr> following the /IF is executed or evaluated.  If
  1192.   the result is non-zero, the next <list> is executed.  Otherwise, this
  1193.   is repeated for each /ELSEIF.  If none of the /IF or /ELSEIF <list>s or
  1194.   <expr>s return non-zero, the /ELSE <list> is executed if there is one.
  1195.  
  1196.   The return value of the /IF.../ENDIF statement is the return value
  1197.   of the last <expr> evaluated or <list> executed.
  1198.  
  1199.   /IF (expr) body%; /ENDIF
  1200.     is equivalent to
  1201.   /IF /TEST expr%; /THEN body%; /ENDIF
  1202.  
  1203.   When /IF is used on the command line, "%;" command separation is done
  1204.   even if %sub=off.  Of course, full substitution will be done if
  1205.   %sub=full.
  1206.  
  1207.   Example:
  1208.   /if (TERM !~ "dumb") /visual on%; /endif
  1209.   will do "/visual on" if your %{TERM} is not "dumb".
  1210.  
  1211.   See: expansion, expressions, /test
  1212.  
  1213. @/input
  1214.  
  1215.   Usage:
  1216.  
  1217.   /INPUT <text>
  1218.   ___________
  1219.  
  1220.   Enters <text>    into the input buffer as if it had been    typed at the
  1221.   keyboard, without deleting the current contents of the input buffer.
  1222.  
  1223.   /Input is perhaps most useful    in combination with /bind, to create
  1224.   short    key sequences that expand to longer text.  For example,    if you
  1225.   have this binding:
  1226.  
  1227.     /bind ^[oj = /input OliverJones
  1228.  
  1229.   and then type    "page ^[oj = snausages!" at the keyboard, it will appear
  1230.   in the input window as "page OliverJones = snausages!".
  1231.  
  1232.   See: /bind, /grab
  1233.  
  1234. @/ismacro
  1235.  
  1236.   Usage:
  1237.  
  1238.   /ISMACRO <macro-options>
  1239.   ___________
  1240.  
  1241.   If <macro-options> matches one or more existing macros, /ismacro
  1242.   returns the number of the last matching macro; otherwise, /ismacro
  1243.   returns 0.  <macro-options> may include any of the options accepted
  1244.   by /list.  If -m is not specified, %{matching} is used.
  1245.  
  1246.   Example:
  1247.   /if /!ismacro -b"^X*"%; /then /bind ^X = /foobar%; /endif
  1248.  
  1249.   See: /list, macros
  1250.  
  1251. @keys
  1252. @kbbind
  1253. @kbfunc
  1254. @kbfunc.tf
  1255. @kbbind.tf
  1256. @keybindings
  1257.  
  1258.   Default keybindings:
  1259.  
  1260.    Key     Command        Meaning
  1261.    ---     -------        -------
  1262.    ^?     /dokey BSPC        backspace
  1263.    ^A     /dokey_home        cursor to beginning of line
  1264.    ^B     /dokey_wleft        cursor to beginning of word
  1265.    ^D     /dokey_dch        delete character
  1266.    ^E     /dokey_end        cursor to end of line
  1267.    ^F     /dokey_wright        cursor to end of word
  1268.    ^G     /beep 1        beep
  1269.    ^H     /dokey BSPC        backspace
  1270.    ^I     /dokey page        scroll 1 screenful at --More-- prompt
  1271.    ^J     /dokey NEWLINE        execute current line
  1272.    ^K     /dokey_deol        delete to end of line
  1273.    ^L     /dokey redraw        redraw screen
  1274.    ^N     /dokey recallf        recall forward input history
  1275.    ^P     /dokey recallb        recall backward input history
  1276.    ^R     /dokey REFRESH        refresh line
  1277.    ^T     /kb_transpose_chars    transpose characters
  1278.    ^U     /dokey DLINE        delete line
  1279.    ^V     /dokey LNEXT        input next key literally
  1280.    ^W     /dokey BWORD        delete backward word (space-delimited)
  1281.    ^[^E     /kb_expand_line    expand current line in place
  1282.    ^[spc /kb_collapse_space     change multiple spaces to a single space
  1283.    ^[-     /kb_goto_match        move cursor to matching parenthsis or bracket
  1284.    ^[.     /kb_last_argument    input last word of previous line
  1285.    ^[J     /dokey selflush    selective flush (flush non-hilited text)
  1286.    ^[OA     /dokey UP        cursor up
  1287.    ^[OB     /dokey DOWN        cursor down
  1288.    ^[OC     /dokey RIGHT        cursor right
  1289.    ^[OD     /dokey LEFT        cursor left
  1290.    ^[[A     /dokey UP        cursor up
  1291.    ^[[B     /dokey DOWN        cursor down
  1292.    ^[[C     /dokey RIGHT        cursor right
  1293.    ^[[D     /dokey LEFT        cursor left
  1294.    ^[_     /kb_last_argument    input last word of previous line
  1295.    ^[b     /dokey socketb        foreground previous socket
  1296.    ^[c     /kb_capitalize_word    capitalize word
  1297.    ^[d     /dokey_dword        delete forward word
  1298.    ^[f     /dokey socketf        foreground next socket
  1299.    ^[h     /dokey hpage        scroll half screenful at --More-- prompt
  1300.    ^[j     /dokey flush        flush (discard text after --More-- prompt)
  1301.    ^[l     /dokey line        scroll 1 line at --More-- prompt
  1302.    ^[l     /kb_downcase_word    downcase word
  1303.    ^[n     /dokey searchf        search forward input history
  1304.    ^[p     /dokey searchb        search backward input history
  1305.    ^[u     /kb_upcase_word    upcase word
  1306.    ^[v     /test insert:=!insert    toggle insert mode
  1307.    ^[^?     /kb_backward_kill_word    delete backward word (punctuation-delimited)
  1308.  
  1309.   At startup, tf also examines the terminal settings for keys
  1310.   corresponding to the /dokey functions UP, DOWN, LEFT, RIGHT, BSPC,
  1311.   BWORD, DLINE, REFRESH, and LNEXT, and binds them accordingly if
  1312.   different than the default bindings listed above.
  1313.  
  1314.   Keybindings similar to those in bash or emacs can be defined by
  1315.   /loading bind-bash.tf or bind-emacs.tf.
  1316.  
  1317.   See: /dokey, /bind, completion, %wordpunct
  1318.  
  1319. @/kill
  1320.  
  1321.   Usage:
  1322.  
  1323.   /KILL    <pid>
  1324.   ___________
  1325.  
  1326.   Terminates a tinyprocess (/quote or /repeat command) denoted by
  1327.   <pid>.  The pid of a tinyprocess can be determined from the return
  1328.   value of the /quote or /repeat, the /ps command, or a PROCESS hook.
  1329.  
  1330.   See: processes, /quote, /repeat, /ps
  1331.  
  1332. @/cd
  1333. @/pwd
  1334. @/lcd
  1335.  
  1336.   Usage:
  1337.  
  1338.   /LCD [<dir>]
  1339.   /CD [<dir>]
  1340.   /PWD
  1341.   ___________
  1342.  
  1343.   /lcd and /cd change to a new working directory.  If <dir> is omitted
  1344.   with /lcd, the current directory is displayed (if supported on your
  1345.   system).  If <dir> is omitted with /cd, %{HOME} is assumed.
  1346.  
  1347.   The <dir> name is expanded as described under "filenames".
  1348.  
  1349.   /pwd displays the current working directory (if supported on your system).
  1350.  
  1351. @/let
  1352.  
  1353.   Usage:
  1354.  
  1355.   /LET <name>=<value>
  1356.   /LET <name> <value>
  1357.   ___________
  1358.  
  1359.   Assigns <value> to variable <name> in the current local level.  Can
  1360.   only be used during macro expansion.  The variable will be destroyed
  1361.   when the scope (expansion level) in which it was created exits.
  1362.  
  1363.   Note to lisp users:  this is nothing like lisp's let.
  1364.  
  1365.   See: /set, variables
  1366.  
  1367. @/listbind
  1368. @/listdef
  1369. @/listgag
  1370. @/listhilite
  1371. @/listhook
  1372. @/listtrig
  1373. @/list
  1374.  
  1375.   Usage:
  1376.  
  1377.   /LIST    [-s] [<macro-options>] [<name>]    [= <body>]
  1378.   ___________
  1379.  
  1380.   Lists    macros having all the specified    options.  Except for "-s", each
  1381.   option is compared against a macro's option, and the macro selected
  1382.   only if the options match.  Omitted options are "don't care",    and
  1383.   will not be used in the comparison.  Thus, with no arguments,    /list
  1384.   will list all    macros.
  1385.  
  1386.   Options:
  1387.  
  1388.   -s        List macros in short format.  Must be first option.
  1389.  
  1390.   -m<matching>    Determines matching style used for comparison of
  1391.         string fields (trigger, binding, hook, worldtype,
  1392.         name, and body).  This is NOT compared against the
  1393.         -m options of other macros.  If omitted, the style
  1394.         is determined by %{matching}.
  1395.  
  1396.   -t<pattern>    Matches    macros with triggers matching <pattern>.
  1397.         "-t" with no pattern matches all non-empty triggers;
  1398.         a "{}" glob pattern or "^$" regexp can be used to
  1399.         match empty triggers (i.e., no trigger).
  1400.  
  1401.   -b<pattern>    Matches    macros with bindings matching <pattern>.
  1402.         "-b" with no pattern matches all non-empty bindings;
  1403.         a "{}" glob pattern or "^$" regexp can be used to
  1404.         match empty bindings (i.e., no binding).
  1405.  
  1406.   -h<pattern>    Matches    macros with hooks matching <pattern>.  "-h"
  1407.         by itself matches all non-empty hooks; "-h0" matches
  1408.         only macros without hooks.
  1409.  
  1410.   -a<attrs>    Matches    macros having one or more of the display
  1411.         attributes in <attrs>.
  1412.  
  1413.   -i        Matches    invisible macros as well as normal macros.
  1414.  
  1415.   -I        Matches    only invisible macros.
  1416.  
  1417.   <name>    A pattern that macro names must    match.    The glob
  1418.         pattern "{}" or regexp "^$" will match only macros
  1419.         without names.
  1420.  
  1421.   = <body>    <body> is a pattern that maco bodies must match.  The
  1422.         glob pattern "{}", or the regexp "^$", or the pattern ""
  1423.         will match bodyless macros only.
  1424.  
  1425.   The -p, -c, -F, and -n options are strightforward comparisons.
  1426.  
  1427.   The return value of /list is the number of the last macro listed,
  1428.   or 0 if no macros were listed (because of error or none matched the
  1429.   specified options).
  1430.  
  1431.   The standard library also defines the macros /listbind, /listdef,
  1432.   /listgag, /listhilite, /listfullhilite, /listpartial, /listhook, and
  1433.   /listtrig, which list macros of the appropriate type.
  1434.  
  1435.   Example:  /list -mregexp -n0 -t -aurfdh ^foo =
  1436.   will list all    macros whose names begin with "foo"; have a trigger;
  1437.   are not multi-shots; have any of the underline, reverse, flash, dim,
  1438.   or hilite attributes; and have an empty body.
  1439.  
  1440.   See: macros, triggers, patterns, attributes, library,    /def
  1441.  
  1442. @/listsockets
  1443.  
  1444.   Usage:
  1445.  
  1446.   /LISTSOCKETS
  1447.   ___________
  1448.  
  1449.   Lists the sockets to which Fugue is connected.  The output will look
  1450.   something like this:
  1451.  
  1452.      LINES IDLE TYPE      NAME            HOST                       PORT
  1453.         48  13h tiny.muck Cave            tcp.com                    2283
  1454. *  foregnd   1m tiny.mush DeepSeas        muds.okstate.edu           6250
  1455.       none   7s telnet    whitehouse.gov, whitehouse.gov             smtp
  1456. ?     none  15s tiny      SlowMUD         slow.machine.com           4201
  1457.  
  1458.   The columns and their meanings are:
  1459.   unlabeled first column:  the state of the socket is "*" for current,
  1460.      "!" for dead, or "?" for pending.
  1461.   LINES:  for a background socket, the number of unseen lines; for a
  1462.      foreground socket, "foregnd".
  1463.   IDLE:  how long since the last text was received on the socket.
  1464.   TYPE:  the type of the world (set with /addworld -T).
  1465.   NAME:  the name of the world associated with the socket.
  1466.   HOST:  the host to which the socket is connected.
  1467.   PORT:  the port to which the socket is connected.
  1468.  
  1469.   See: sockets,    /background, /connect, /fg, idle()
  1470.  
  1471. @/listworlds
  1472.  
  1473.   Usage:
  1474.  
  1475.   /LISTWORLDS [-c] [<pattern>]
  1476.   ___________
  1477.  
  1478.   Lists    the worlds Fugue knows about, and also displays    the current
  1479.   default character name.  Passwords are not displayed unless the -c
  1480.   option is given.  The matching style used by <pattern> is determined
  1481.   by %{matching}.
  1482.  
  1483.   The return value of /listworlds is the number of worlds listed.
  1484.  
  1485.   See: worlds, patterns
  1486.  
  1487. @/loadbind
  1488. @/loaddef
  1489. @/loadgag
  1490. @/loadhilite
  1491. @/loadhook
  1492. @/loadtrig
  1493. @/load
  1494.  
  1495.   Usage:
  1496.  
  1497.   /LOAD    <file>
  1498.   ___________
  1499.  
  1500.   Loads    commands from <file>.
  1501.  
  1502.   The file may contain any legal TinyFugue commands.  Blank lines and
  1503.   lines beginning with ';' are ignored.  Any leading whitespace on a
  1504.   line is stripped.  Any line ending in '\' will have the following
  1505.   line joined to it.  A '%' preceding a '\' eliminates its special
  1506.   meaning.
  1507.  
  1508.   The <file> name is expanded as described under "filenames".
  1509.  
  1510.   If the expanded filename does not begin with '/', TF will search
  1511.   first in the current directory (which can be changed with /lcd), and
  1512.   then in %{TFLIBDIR}.  If the COMPRESS_SUFFIX and COMPRESS_READ macros
  1513.   are defined, the file will be automatically uncompressed if needed.
  1514.  
  1515.   Loaded files may be given any name, but names ending in ".tf" are
  1516.   recommended.
  1517.  
  1518.   The standard macro library also defines the commands /loaddef,
  1519.   /loadbind, /loadhilite, /loadgag, /loadtrig, and /loadhook.  These
  1520.   macros will load from    a default file if no file is specified.
  1521.  
  1522.   See: macros, library,    /def, /save, /require, /lcd, filenames
  1523.  
  1524. @/log
  1525.  
  1526.   Usage:
  1527.  
  1528.   /LOG [-ligw[<world>]] [OFF|ON|<file>]
  1529.   ___________
  1530.  
  1531.   Enables, disables, or lists log files.  An [-ligw] option specifies
  1532.   which history is used; the [OFF|ON|<file>] argument specifies what
  1533.   action is taken on that history.
  1534.  
  1535.   Options:
  1536.     -w<world>    Output from <world> only.
  1537.     -w        Output from the current foreground world.
  1538.     -l        Local output (i.e., output generated by TF).
  1539.     -i        Keyboard input.
  1540.     -g        Global output (all worlds and local TF output).
  1541.  
  1542.   Arguments:
  1543.     OFF        Disable specified log, or all logs if unspecified.
  1544.     ON        Log to ${LOGFILE}; -g is assumed if -ligw not given.
  1545.     <file>    Log to <file>; -g is assumed if -ligw not given.
  1546.     (no arg)    With no option, lists all open logs.
  1547.     (no arg)    With an -ligw option, same as "ON".
  1548.  
  1549.   It is possible to have multiple log files open simultaneously.  It is
  1550.   also possible    to have    several    types of output    go to the same log
  1551.   file,    by using several /log commands.     For example,
  1552.  
  1553.     /log -i tt.log
  1554.     /log -wTT tt.log
  1555.     /log -g on
  1556.  
  1557.   will send input from the keyboard and    output from the    world TT to the
  1558.   file "tt.log", and also send all (global) output to the file named by
  1559.   the LOGFILE macro.
  1560.  
  1561.   The functions    of the /logme command in older versions    of TF can be
  1562.   performed with /log -i.
  1563.  
  1564.   Wrapping will    be done    in the log file    only if    the %{wraplog} variable
  1565.   is "on".
  1566.  
  1567.   Logging is disabled by default.  The default value of ${LOGFILE}
  1568.   is "tiny.log".
  1569.  
  1570.   See: %wraplog
  1571.  
  1572. @/logme
  1573.  
  1574.   Obsolete.  See "log".
  1575.  
  1576. @scroll
  1577. @pager
  1578. @/more
  1579.  
  1580.   Usage:
  1581.  
  1582.   /MORE    [OFF|ON]
  1583.   ___________
  1584.  
  1585.   Sets the value of the    %{more}    flag.  If the %{more} flag is ON
  1586.   when the screen or output window fills up, output will stop, and
  1587.   a --More-- prompt will be displayed.    With the default keybindings,
  1588.   TAB will scroll one screenfull, ^[h will scroll a Half screen,
  1589.   ^[l will scroll one Line, and    ^[j will Jump to the end of the
  1590.   text,    skipping all text which    has been received but not yet
  1591.   displayed.
  1592.  
  1593.   In visual mode, if there are more than 20 logical lines pending, the
  1594.   number of lines is displayed with the More prompt.  To avoid
  1595.   "spammage", the number is not updated for every new line, but only in
  1596.   increments of 20 or when the screen is updated for some other
  1597.   reason.  If the number of pending lines is 1000 or more, no number
  1598.   will be displayed and the prompt will just say "MuchMore".
  1599.  
  1600.   If your terminal can't scroll in visual mode, TF will start over at
  1601.   the top of the output window instead.
  1602.  
  1603.   See: /dokey, %more
  1604.  
  1605. @/nogag
  1606.  
  1607.   Usage:
  1608.  
  1609.   /NOGAG [<pattern>]
  1610.   ___________
  1611.  
  1612.   Eliminates a macro that is triggered by <pattern> and    has the    gag
  1613.   attribute.  /nogag with no arguments turns off the flag %{gag},
  1614.   disabling all    gag attributes.  <pattern> is matched against
  1615.   exisiting patterns using simple comparison.
  1616.  
  1617.   The flag %{gag} defaults to 1    (on).
  1618.  
  1619.   See: triggers, /gag, %gag
  1620.  
  1621. @/nohilite
  1622.  
  1623.   Usage:
  1624.  
  1625.   /NOHILITE [<pattern>]
  1626.   ___________
  1627.  
  1628.   Eliminates a macro that is triggered by <pattern> and    has the    hilite
  1629.   attribute.  /nohilite    with no    arguments turns    off the    flag %{hilite},
  1630.   disabling all    hilite attributes.  <pattern> is matched against
  1631.   existing patterns using simple comparison.
  1632.  
  1633.   The flag %{hilite} defaults to 1 (on).
  1634.  
  1635.   See: triggers, /hilite, %hilite
  1636.  
  1637. @/first
  1638. @/last
  1639. @/nth
  1640.  
  1641.   Usage:
  1642.   /FIRST <text>
  1643.   /LAST <text>
  1644.   /NTH <n> <text>
  1645.   ___________
  1646.  
  1647.   Echoes the first, last, or <n>th word from text.  `/first <text>' is
  1648.   equivalent to `/nth 1 <text>'.
  1649.  
  1650.   These commands can be useful in command substitutions.  For example,
  1651.   to make `ESC 1' input the first word of the most recent mud output, you
  1652.   could do this:
  1653.  
  1654.     /bind ^[1 = /input $(/first $(/recall 1))
  1655.  
  1656.   See: parameters, command substitution
  1657.  
  1658. @/partial
  1659.  
  1660.   Usage:
  1661.  
  1662.   /PARTIAL <regexp>
  1663.   ___________
  1664.  
  1665.   Creates a macro which will hilite the part of a line containing text
  1666.   matched by the regular expression <regexp>.  Remember that regular
  1667.   expressions are case sensitive.  The new macro is a fall-thru, so
  1668.   mutiple /partials (and other triggers) can match the same text.
  1669.  
  1670.   The attribute(s) for hilited text are determined by the %{hiliteattr}
  1671.   variable.  The default is bold (hiliteattr=B).  Colors are also
  1672.   available.
  1673.  
  1674.   For example, "/partial [Hh]awkeye" will hilite any occurance of
  1675.   "Hawkeye" or "hawkeye".
  1676.  
  1677.   Unlike version 3.2, a partial hilite will be applied to every match
  1678.   on a line, not just the first match.
  1679.  
  1680.   /partial <regexp>
  1681.     is equivalent to
  1682.   /def -Ph -F -t<regexp>
  1683.  
  1684.   See: attributes, patterns, /hilite, /def
  1685.  
  1686. @/endpaste
  1687. @/paste
  1688.  
  1689.   Usage:
  1690.  
  1691.   /PASTE [<prefix>]
  1692.   /ENDPASTE
  1693.   ___________
  1694.  
  1695.   After executing /paste, every line of input that would normally get
  1696.   sent to the socket will first have <prefix> prepended to it.  If
  1697.   <prefix> is omitted, it defaults to ":|".  /endpaste turns this off.
  1698.   /paste and /endpaste are very useful when using the cut-and-paste
  1699.   mechanism of many windowing systems.
  1700.  
  1701.   See: /quote
  1702.  
  1703. @/prompt
  1704.  
  1705.   Usage:
  1706.  
  1707.   /PROMPT <text>
  1708.   ___________
  1709.  
  1710.   Sets the prompt for the current socket to <text>, replacing any
  1711.   existing prompt.  /prompt is most useful when called from a PROMPT
  1712.   hook, like this:
  1713.  
  1714.     /def -h"PROMPT *> " catch_prompt = /prompt %*
  1715.  
  1716.   See: prompts, hooks (PROMPT)
  1717.  
  1718. @/ps
  1719.  
  1720.   Usage:
  1721.  
  1722.   /PS
  1723.   ___________
  1724.  
  1725.   Lists information about currently running /quote and /repeat processes:
  1726.  
  1727.   PID        unique process identification number.
  1728.   NEXT        seconds until next execution of process, or "pending"
  1729.         if process is waiting for output from a shell command.
  1730.   TYPE        /quote or /repeat.
  1731.   DISP        disposition (echo, send, or exec) of /quote lines.
  1732.   WORLD        world to which output is sent, if not the current world.
  1733.   PTIME        delay between executions.
  1734.   COUNT        number of /repeat executions remaining.
  1735.   COMMAND    the command to be executed.
  1736.  
  1737.   See: processes
  1738.  
  1739. @/purgebind
  1740. @/purgedef
  1741. @/purgedeft
  1742. @/purgegag
  1743. @/purgehilite
  1744. @/purgehook
  1745. @/purgetrig
  1746. @/purge
  1747.  
  1748.   Usage:
  1749.  
  1750.   /PURGE [<macro-options>] [<name>] [= <body>]
  1751.   ___________
  1752.  
  1753.   Removes all macros matching the specified restrictions.  The
  1754.   <macro-options> are the same as those in the /list command; see
  1755.   "/list" for details.  Invisible macros will not be purged unless "-i"
  1756.   is specified.  Remember that the word "macros" includes keybindings,
  1757.   hilites, gags, triggers, and hooks.
  1758.  
  1759.   The standard macro library also defines the commands /purgedef,
  1760.   /purgebind, /purgehilite, /purgegag, /purgetrig, /purgdeft, and
  1761.   /purgehook, which purge macros of the    appropriate type.  These
  1762.   always use glob matching.
  1763.  
  1764.   See: macros, triggers, patterns, attributes, library,    /def, /list
  1765.  
  1766. @/purgeworld
  1767.  
  1768.   Usage:
  1769.  
  1770.   /PURGEWORLD <pattern>
  1771.   ___________
  1772.  
  1773.   Purges all world entries matching <pattern>.  The pattern matching
  1774.   style is determined by %{matching}.
  1775.  
  1776.   See: worlds, patterns
  1777.  
  1778. @upload
  1779. @/putfile_MUCK
  1780. @/putfile_UNIX
  1781. @/putfile_LP
  1782. @/putfile
  1783.  
  1784.   Usage:
  1785.  
  1786.   /REQUIRE file-xfer.tf
  1787.  
  1788.   /PUTFILE_MUCK <file> [<remote-file>]
  1789.   /PUTFILE_LP   <file> [<remote-file>]
  1790.   /PUTFILE_UNIX <file> [<remote-file>]
  1791.   ___________
  1792.  
  1793.   Uploads text <file> from the local system to <remote-file> on a MUCK, LP,
  1794.   or UNIX server, using an editor on the remote system.  If <remote-file>
  1795.   is omitted, <file> is used as the name of the remote file.
  1796.  
  1797.   /Putfile_LP assumes the LPmud has an "ed" editor similar to that in UNIX.
  1798.  
  1799.   For backward compatibility, /putfile is the same as /putfile_MUCK.
  1800.  
  1801.   See:  /getfile, /quote
  1802.  
  1803. @/quit
  1804.  
  1805.   Usage:
  1806.  
  1807.   /QUIT
  1808.   ___________
  1809.  
  1810.   Exits    from TinyFugue.  All connections and logfiles will be closed;
  1811.   /quotes and /repeats will be killed; and all history,    unsaved
  1812.   macros, and variables    will be    lost.
  1813.  
  1814. @quoting
  1815. @/qsh
  1816. @/qtf
  1817. @/qfile
  1818. @/qmud
  1819. @quoter.tf
  1820.  
  1821.   Usage:
  1822.  
  1823.   /REQUIRE quoter.tf
  1824.  
  1825.   /qdef   [<prefix>] <name>  - quote a current macro definition
  1826.   /qmac   [<prefix>] <name>  - quote a macro from a macro file
  1827.   /qworld [<prefix>] <name>  - quote a world definition
  1828.   /qfile  [<prefix>] <name>  - quote a file
  1829.   /qtf    <cmd>              - quote a tf command
  1830.   /qsh    <cmd>              - quote a shell command
  1831.   /qmud   <cmd>              - quote a mud command
  1832.   ________
  1833.  
  1834.   Each of these commands will quote some text to the current world.
  1835.   <prefix> is prepended to each generated line.  The default prefix is
  1836.   ":|", but can be changed in /qdef, /qmac, /qworld, and /qfile.
  1837.  
  1838.   /qmac will search a list of commonly used filenames.  To add your
  1839.   own, add them to %{_qmac_files}.
  1840.  
  1841.   /qworld will not list passwords.
  1842.  
  1843.   /qmud requires that the current world supports OUTPUTPREFIX and
  1844.   OUTPUTSUFFIX.
  1845.  
  1846.   See: /quote, /list, /listworlds, /sh, tfrc
  1847.  
  1848. @/quote
  1849.  
  1850.   Usage:
  1851.  
  1852.   /QUOTE [-d<disp>] [-w[<world>] [-<time>] [<pre>] '"<file>"[<suf>]
  1853.   /QUOTE [-d<disp>] [-w[<world>] [-<time>] [<pre>] !"<shell command>"[<suf>]
  1854.   /QUOTE [-d<disp>] [-w[<world>] [-<time>] [<pre>] `"<TF command>"[<suf>]
  1855.   /QUOTE [-d<disp>] [-w[<world>] [-<time>] [<pre>] #"<recall command>"[<suf>]
  1856.   ___________
  1857.  
  1858.   /Quote generates lines of text, one for each line quoted from a file,
  1859.   shell command, history, or TF command.  This will be done at a rate
  1860.   described in the section "processes".
  1861.  
  1862.   Options and arguments:
  1863.  
  1864.   -d<disp>    disposition of generated text.  <disp> is one of:
  1865.         "echo" (echo to the screen), "send" (send directly to
  1866.         the socket), or "exec" (execute text as a tf command).
  1867.         The default <disp> is "send" if there is no <pre>, and
  1868.         "exec" if there is a <pre>.
  1869.  
  1870.   -w<world>    Commands will be executed with <world> as the current
  1871.         world.  If <world> is blank, it uses the world that was
  1872.         current when the /quote started.  If -w is omitted, the
  1873.         command's current world will be whatever happens to be in
  1874.         the foreground when the command occurs.  (See "/help
  1875.         sockets").
  1876.  
  1877.   -<time>    The delay between each generated line.  It can have the
  1878.         format "hh:mm:ss", "hh:mm", or "ss".  If -<time> is omitted,
  1879.         the user variable %{ptime} is used.  If <time> is given as
  1880.         the letter "S", the quote will run synchronously with no
  1881.         delay (see "processes").  If a slow shell command is used
  1882.         with /quote -S !, tf will hang until the command produces
  1883.         some output or exits.  A synchronous /quote may be used
  1884.         inside another /quote.
  1885.  
  1886.   <pre>        <pre> is prefixed to each generated line.  If <pre> contains
  1887.         any of the command characters ('!`#), they must be
  1888.         preceded with '\' to remove their special meaning.
  1889.  
  1890.   '<file>    Get text from <file>.  The <file> name is expanded as
  1891.         described under /help filenames.
  1892.  
  1893.   !<shell cmd>    Get text from the standard output and standard error
  1894.         of executing <shell cmd> in the shell.
  1895.  
  1896.   `<tf cmd>    Get text from the output of executing <tf cmd> in tf.
  1897.  
  1898.   #<recall cmd>    Get text from executing a /recall command.  (See "recall"
  1899.         for the exact syntax).
  1900.  
  1901.   <suf>        <suf> is suffixed to each generated line.  If omitted, the
  1902.         double quotes around the <file> or <command> may be omitted.
  1903.  
  1904.  
  1905.   An asynchronous /quote returns the pid of the new process, or 0 if an
  1906.   error occured.  A synchronous shell or command quote returns the return
  1907.   value of the command.  A synchronous file quote returns 0 on error,
  1908.   nonzero otherwise.
  1909.  
  1910.   The following is a list of some nearly equivilent pairs of commands:
  1911.     /quote -S -dexec '<file>        /load <file>
  1912.     /quote -S -decho #<args>        /recall <args>
  1913.     /quote <opts> `/recall <args>        /quote <opts> #<args>
  1914.  
  1915.   ___________
  1916.  
  1917.   Examples:
  1918.  
  1919.   (1) /quote -1    :reads about '"/usr/dict/words"    in the dictionary.
  1920.  
  1921.   This sends off lines like:
  1922.        :reads about aardvark in    the dictionary.
  1923.        :reads about aardvore in    the dictionary.
  1924.   with one-second delays between lines.
  1925.  
  1926.   (2) /quote -S    /echo !ps -gux
  1927.  
  1928.   This displays    the output of the system command "ps -gux" by echoing
  1929.   it locally, immediately.
  1930.  
  1931.   (3) /quote -0    :heard: #-wCave /2 *pages*
  1932.  
  1933.   This sends off quickly:
  1934.  
  1935.        :heard: [the last 2 lines from Cave that contain "pages"]
  1936.  
  1937.   (4) /quote :is using `/version
  1938.  
  1939.   will tell everybody in the room what version of TF you're running.
  1940.  
  1941.   (5) /quote -wlpmud -dsend 'prog.c
  1942.  
  1943.   will send the file "prog.c" to the world "lpmud" (without any interpretation
  1944.   of leading spaces, lines like "/* comment */", etc.)
  1945.  
  1946.   ___________
  1947.  
  1948.   See: processes, history, command subs, /load, /recall, /sh, /sys
  1949.  
  1950. @/recall
  1951.  
  1952.   Usage:
  1953.  
  1954.   /RECALL [-w<world>] [-ligt] [-a<attrs>] [-m<style>] [#]<range> [<pattern>]
  1955.   ___________
  1956.  
  1957.   Recalls lines    from a history buffer.
  1958.  
  1959.   Options:
  1960.     -w        recall from current world's history (default)
  1961.     -w<world>    recall from <world>'s history
  1962.     -l        recall from local history (i.e., TF output)
  1963.     -g        recall from global history (all    worlds,    and local)
  1964.     -i        recall from input history
  1965.     -t        display    timestamps on each line, using %{time_format}
  1966.     -a<attr>    suppress specified attributes (e.g., -ag shows gagged lines)
  1967.     -m<style>    matching style (simple, glob, or regexp).
  1968.     #        display    line numbers (must be last option, before <range>)
  1969.  
  1970.   <range> can have one of the formats below.  If <x> and <y> are plain
  1971.   integers, they are interpreted as line numbers or counts.  If they
  1972.   have the form "hh:mm" or "hh:mm:ss", they are interpreted as time
  1973.   values (either a period of time, or a clock time within the last 24
  1974.   hours).
  1975.  
  1976.     /x        Recall the last <x> matching lines.
  1977.  
  1978.     x        Recall from the last <x> lines, or lines within the
  1979.         last time period <x>.
  1980.  
  1981.     x-y        Recall lines starting with <x> and ending with <y>.
  1982.  
  1983.     -y        If <y> is a line number, recall    the <y>th previous line;
  1984.         if <y> is a time, recall lines earlier than <y>.  Remember
  1985.         to use "--" so "-<y>" isn't interpreted as an option.
  1986.  
  1987.     x-        Recall lines after <x>.
  1988.  
  1989.   If <range> is    prefixed with "#", line    numbers    will be    displayed.
  1990.  
  1991.   If <pattern> is given, only lines in the given range that match
  1992.   <pattern> will be recalled.  The matching style is determined
  1993.   by the -m option if given, %{matching} otherwise.
  1994.  
  1995.   If lines are received while tf is suspended (by ^Z or /suspend) or
  1996.   in a subshell (by /sh), the timestamps on the lines will correspond
  1997.   to the time tf resumed control, not the time they actually arrived.
  1998.  
  1999.   The return value of /recall is the number of lines that were actually
  2000.   recalled.
  2001.  
  2002.   See: history,    attributes, /quote, %time_format
  2003.  
  2004. @/recordline
  2005.  
  2006.   Usage:
  2007.  
  2008.   /RECORDLINE [-lig] [-w<world>] <text>
  2009.   ___________
  2010.  
  2011.   Records <text> into a    history    buffer.     The '-l' option selects
  2012.   local    history; '-i' selects input history; '-g' selects global
  2013.   history; and '-w<world>' selects the history buffer for <world>.
  2014.   If none of the -ligw options are specified, -g is assumed.
  2015.  
  2016.   The <text> will not be echoed    to the screen or saved in any log.
  2017.  
  2018.   /Recordline can be combined with /quote to read a log    file back
  2019.   into history.     For example, if you had created a log with
  2020.   "/log    -i input.log" in an earlier tf session,    you could start    a
  2021.   new tf session and use
  2022.  
  2023.     /quote -dexec /recordline -i 'input.log
  2024.  
  2025.   to restore that input history.  That way, you could use the RECALLB,
  2026.   RECALLF, RECALLBEG, RECALLEND, SEARCHB, and SEARCHF (^P, ^N, ^[<, ^[>,
  2027.   ^[P, and ^[N) keys to recall lines you typed in the earlier session.
  2028.  
  2029.   See: /recall, /quote, history
  2030.  
  2031. @/repeat
  2032.  
  2033.   Usage:
  2034.  
  2035.   /REPEAT [-w[<world>] [-<time>] <count> <command>
  2036.   ___________
  2037.  
  2038.   Repeats <command>, <count> times.  <command> may be any legal    macro
  2039.   body.     This works through a tiny-process, i.e. it runs concurrently
  2040.   with normal input and    output.
  2041.  
  2042.   If <time> is specified, it is    used as    the delay between each line.
  2043.   It can have the format "hh:mm:ss", "hh:mm", or "ss".    Otherwise, the
  2044.   user variable    %{ptime} is used.
  2045.  
  2046.   If <time> is given as the letter "S", the repeat will run synchronously.
  2047.   See /help processes.
  2048.  
  2049.   Socket commands generated by /repeat will be sent to the foreground
  2050.   world    by default.  If    -w<world> is given, commands will be sent to
  2051.   that world instead.  If -w is    given, commands    will be    sent to    the
  2052.   world    that was current when the /repeat was started.
  2053.  
  2054.   Since without "-S" the first run is not done until after the first
  2055.   interval, a useful trick is to use "/repeat -<time> 1 <command>" to
  2056.   delay the execution of a single command.
  2057.  
  2058.   The body of the /repeat command undergoes macro body substitution
  2059.   when it is executed.
  2060.  
  2061.   An asynchronous /repeat returns the pid of the new process, or 0 if
  2062.   an error occured.  A synchronous /repeat returns the return value of
  2063.   the last command.
  2064.  
  2065.   Example:  Here's a technique to execute an infinite 30-minute repeat:
  2066.     /def doodle_forever    = /doodle%; /repeat -0:30 1 /doodle_forever
  2067.  
  2068.   See: processes, %ptime, /at
  2069.  
  2070. @/require
  2071.  
  2072.   Usage:
  2073.  
  2074.   /REQUIRE <file>
  2075.   ___________
  2076.  
  2077.   Reads <file> as if by /load, except that if <file> is a tf library and
  2078.   has already been read once, it will not be read again.
  2079.  
  2080.   See: /load, library
  2081.  
  2082. @security
  2083. @/restrict
  2084.  
  2085.   Usage:
  2086.  
  2087.   /RESTRICT [SHELL|FILE|WORLD]
  2088.   ___________
  2089.  
  2090.   With no arguments, /restrict reports the current restriction level.
  2091.  
  2092.   With an argument, /restrict sets the restriction level.  Once    restriction
  2093.   has been set to a particular level, it can not be lowered.
  2094.  
  2095.     level 0: NONE   No restrictions.
  2096.  
  2097.     level 1: SHELL  Prevents all access    to shell or external commands.
  2098.             Disables TF    builtins "/sh" and "/quote !", and
  2099.             uncompression during /load and /help.
  2100.  
  2101.     level 2: FILE   Prevents reading and writing of files.  Disables TF
  2102.             builtins "/load", "/save", "/saveworld", "/log", and
  2103.             "/quote '",    and sockmload feature.    Implies    /restrict
  2104.             shell.
  2105.  
  2106.     level 3: WORLD  Disallows all new user-defined connections.     The TF
  2107.             builtins /addworld and the "/connect <host> <port>"
  2108.             semantics are disabled.  Implies /restrict file.
  2109.  
  2110.   /Restrict is typically placed in %{TFLIBDIR}/local.tf by an
  2111.   administrator of a public copy of TF who wishes to restrict users'
  2112.   access.
  2113.  
  2114.   Note that while I believe these options to be secure, I provide
  2115.   no warranty to that effect.
  2116.  
  2117.   See:  warranty
  2118.  
  2119. @mudwho
  2120. @/rwho
  2121.  
  2122.   Usage:
  2123.  
  2124.   /REQUIRE rwho.tf
  2125.  
  2126.   /RWHO
  2127.   /RWHO name=<player>
  2128.   /RWHO mud=<mud>
  2129.   ___________
  2130.  
  2131.   Gets a remote WHO list from a mudwho server.  The first form gives a
  2132.   complete list, the other forms give partial lists.  Due to the short
  2133.   timeout of the mudwho server, sometimes the complete list is sent
  2134.   even if the second or third format is used (send complaints to the
  2135.   author or maintainer of the mudwho server, not to me).
  2136.  
  2137.   Make sure you /load rwho.tf _after_ you define your worlds, or rwho
  2138.   will be the default world.
  2139.  
  2140. @/savebind
  2141. @/savedef
  2142. @/savegag
  2143. @/savehilite
  2144. @/savehook
  2145. @/savetrig
  2146. @/save
  2147.  
  2148.   Usage:
  2149.  
  2150.   /SAVE    [-a] <file> [<macro-options>] [<name>] [= <body>]
  2151.   ___________
  2152.  
  2153.   Saves    specified macros to <file>.  The <macro-options> are the same as
  2154.   those    in /list command; see "/list" for details.  Invisible macros will
  2155.   not be saved unless "-i" is specified.
  2156.  
  2157.   If "-a" is specified, macros will be appended to <file>.  Otherwise,
  2158.   the macros will overwrite any existing contents of <file>.
  2159.  
  2160.   The return value of /save is the number of the last macro listed,
  2161.   or 0 if no macros were listed (because of error or none matched the
  2162.   specified options).
  2163.  
  2164.   The standard macro library also defines the commands /savedef,
  2165.   /savebind, /savehilite, /savegag, /savetrig, and /savehook.  These
  2166.   macros will save macros of the appropriate type to a file.  If no
  2167.   file name is specified, a default file name will be used.
  2168.  
  2169.   I personally find it easier to write my macros with an editor and
  2170.   then /load them in tf, instead of writing them in tf and /save'ing
  2171.   them to a file.  Use whatever works best for you.
  2172.  
  2173.   See: macros, patterns, attributes, library, /def, /list, /load, /saveworld
  2174.  
  2175. @/saveworld
  2176.  
  2177.   Usage:
  2178.  
  2179.   /SAVEWORLD [-a] [<file>]
  2180.   ___________
  2181.  
  2182.   Saves    world definitions to <file> if specified, otherwise from the file
  2183.   named    in the body of the WORLDFILE macro.
  2184.  
  2185.   If "-a" is given, world definitions will be appended to <file>;
  2186.   otherwise, the world definitions will replace any original contents
  2187.   of <file>.
  2188.  
  2189.   See: worlds, library,    /addworld, /load
  2190.  
  2191. @/send
  2192.  
  2193.   Usage:
  2194.  
  2195.   /SEND    [-W] [-w[<world>]] [-n]    <text>
  2196.   ___________
  2197.  
  2198.   Sends    <text> to <world>.  If "-W" is given, <text> is    sent to    all
  2199.   connected worlds.  If    "-W" and "-w" are omitted, <text> is sent to
  2200.   the current world.
  2201.  
  2202.   If "-n" is given, the    text will be transmitted without a terminating
  2203.   newline character.
  2204.  
  2205.   The /send command never executes a SEND hook.
  2206.  
  2207. @/set
  2208.  
  2209.   Usage:
  2210.  
  2211.   /SET <name>=<value>
  2212.   /SET [<name> [<value>]]
  2213.   ___________
  2214.  
  2215.   In the first form, or    with two arguments, /set will set the value
  2216.   of <name> to <value>.     With one argument, /set will display the
  2217.   value    of <name>.  With no arguments, /set will display the value
  2218.   of all internal variables.  If the first form    is used, there
  2219.   should be no spaces on either    side of    the '='.
  2220.  
  2221.   Variable <name> will be an internal variable unless it has already
  2222.   been defined as an environment variable.
  2223.  
  2224.   Note:     The variables 'L' and 'R' are reserved.  You should not
  2225.   assign values    to them.
  2226.  
  2227.   See: variables, /setenv, /export, /let
  2228.  
  2229. @/setenv
  2230.  
  2231.   Usage:
  2232.  
  2233.   /SETENV [<name> [<value>]]
  2234.   /SETENV <name>=<value>
  2235.  
  2236.   With two arguments, /setenv will set the value of <name> to
  2237.   <value> in the environment.  With one    argument, /setenv will
  2238.   display the value of <name>.    With no    arguments, /setenv will
  2239.   display the value of all environment variables.  If the second
  2240.   form is used,    spaces around the '=' will not be stripped.
  2241.  
  2242.   If <name> was    already    defined    as an internal variable, it will
  2243.   become an environment    variable.
  2244.  
  2245.   See: variables, /set, /export
  2246.  
  2247. @/sh
  2248.  
  2249.   Usage:
  2250.  
  2251.   /SH [<command>]
  2252.   ___________
  2253.  
  2254.   If no command is given, /sh executes an interactive shell named by
  2255.   %{SHELL}, or /bin/sh.  With a command, /sh will execute <command> in
  2256.   a /bin/sh subshell.  The command is executed with a tty, so it may
  2257.   accept input and may produce any output.
  2258.  
  2259.   In visual mode, /sh will fix the screen first, and restore it after
  2260.   executing the    shell.  /Sys does not.
  2261.  
  2262.   If the %{shpause} flag is on,    Fugue will wait    for a keypress before
  2263.   returning.
  2264.  
  2265.   Note:  calling /sh with arguments from a trigger is very dangerous.
  2266.   If not written carefully, such a trigger could allow anyone with
  2267.   access to the server to gain access to your shell account.
  2268.  
  2269.   The return value of /sh is the exit status of    the shell if it    exited
  2270.   normally, -1 otherwise.  Note that shell commands usually return
  2271.   0 for success and nonzero for failure.
  2272.  
  2273.   See: /quote, /sys, utilities (/psh)
  2274.  
  2275. @/shift
  2276.  
  2277.   Usage:
  2278.  
  2279.   /SHIFT [n]
  2280.   ___________
  2281.  
  2282.   Shifts the positional    parameters left    by <n>.     That is, the positional
  2283.   parameters %(n+1) ...    %# are renamed to %1 ... %(#-n).  If <n> is
  2284.   omitted, 1 is    assumed.
  2285.  
  2286.   /shift is useful only    during macro expansion.
  2287.  
  2288.   Example:
  2289.   /def worlds = /while ({#}) /world %1%; /shift%; /done
  2290.  
  2291.   Then, the command "/worlds foo bar baz" would execute the commands
  2292.   "/world foo", "/world bar", and "/world baz".
  2293.  
  2294.   See: variables, expansion
  2295.  
  2296. @/signal
  2297.  
  2298.   Usage:
  2299.  
  2300.   /SIGNAL [<sig>]
  2301.   ___________
  2302.  
  2303.   Sends signal <sig> to the tf process, or with no arguments, /signal
  2304.   lists all valid signal names.  Valid signals usually include:  HUP,
  2305.   INT, QUIT, KILL, SEGV, TERM, USR1, USR2, and TSTP.  The complete list
  2306.   varies from system to system.
  2307.  
  2308.   INT (usually generated by typing ^C) will terminate any /WHILE loop
  2309.   and the user will be prompted for the next action.
  2310.  
  2311.   See:  /suspend, getpid(), hooks (SIGHUP, SIGTERM, SIGUSR1, SIGUSR2)
  2312.  
  2313. @/sub
  2314.  
  2315.   Usage:
  2316.  
  2317.   /SUB [OFF|ON|FULL]
  2318.   ___________
  2319.  
  2320.   Sets the flag    %{sub}.
  2321.  
  2322.   If the flag %{sub} is    OFF (0), all lines except for history substitutions
  2323.   (line    beginning with '^') and    commands (/) are sent as-is to the
  2324.   socket.
  2325.  
  2326.   If the flag %{sub} is    ON (1),    the sequences "%;" and "%\" are    substituted
  2327.   with newlines, and the sequence "%%" is substituted with "%",    and the
  2328.   sequence "\nn" is substituted    with the character with    decimal    ASCII
  2329.   code <nn>.
  2330.  
  2331.   If the flag %{sub} is    FULL, text is processed    just as    if it were the
  2332.   body of a macro (see "expansion") called without any arguments. This
  2333.   allows you to    have in-line macros in regular input.
  2334.  
  2335.   The flag %{sub} defaults to 0    (off).
  2336.  
  2337.   See: general, expansion
  2338.  
  2339. @/substitute
  2340.  
  2341.   Usage:
  2342.  
  2343.   /SUBSTITUTE <text>
  2344.   ___________
  2345.  
  2346.   When called from a trigger (directly or indirectly), the triggering
  2347.   text is replaced with <text>.  After a /substitute, it will appear
  2348.   as if <text> came from the socket; the original text is lost.  In
  2349.   particular, this means when /substitute is called from a fall-thru
  2350.   trigger, triggers of lower priority will be compared against <text>
  2351.   instead of the original text.
  2352.  
  2353.   Example:
  2354.  
  2355.   On a mud that uses MUFpage, you could set your #prepend string to
  2356.   "##page>", and define a trigger like:
  2357.  
  2358.   /def -ah -t"##page> *" hilite_mufpage = /substitute %-1
  2359.  
  2360.   This will match no matter what page format the sender uses, and strip
  2361.   off the "##page>" so you never see it.
  2362.  
  2363.   See:  triggers
  2364.  
  2365. @/suspend
  2366.  
  2367.   Usage:
  2368.  
  2369.   /SUSPEND
  2370.   ___________
  2371.  
  2372.   Suspends TF, if your system and shell    support    job control.  This has the
  2373.   same effect as typing    ^Z on most systems.
  2374.  
  2375.   See:  /signal
  2376.  
  2377. @/sys
  2378.  
  2379.   Usage:
  2380.  
  2381.   /SYS <shell-command>
  2382.   -----------
  2383.  
  2384.   Executes <shell-command>.  The command is executed without a tty, so
  2385.   it should have no input, and its output, if any, should be plain
  2386.   text.  The command's stdout and stderr are echoed to tf's output
  2387.   window.  /sys differs from /sh in that /sys can not do an interactive
  2388.   shell command, but does not redraw the screen or produce any extra
  2389.   messages.
  2390.  
  2391.   Note:  calling /sys with arguments from a trigger is very dangerous.
  2392.   If not written carefully, such a trigger could allow anyone with
  2393.   access to the server to gain access to your shell account.
  2394.  
  2395.   The return value of /sys is the exit status of the shell if it exited
  2396.   normally, -1 otherwise.  Note that shell commands usually return
  2397.   0 for success and nonzero for failure.
  2398.  
  2399.   See:  /sh, /quote
  2400.  
  2401. @/telnet
  2402.  
  2403.   Usage:
  2404.  
  2405.   /TELNET <host> [<port>]
  2406.   -----------
  2407.  
  2408.   Connect to a line-based telnet host.  The telnet login port is used if
  2409.   <port> is omitted.
  2410.  
  2411.   Note that TF operates strictly in line-by-line mode, but telnetd (the
  2412.   server running on the telnet login port) expects character-by-
  2413.   character mode.  So, simple shell operations and anything else which
  2414.   is basically line-by-line should work without much difficulty, but
  2415.   anything that tries to control the screen or expects single keystroke
  2416.   input will _not_ work.  /telnet is somewhat useful, but not useful
  2417.   enough to alter the fundamental line-by-line nature of TF.  If you
  2418.   want a general telnet client, you know where to find it.
  2419.  
  2420.   When connected to a telnetd, you will notice that the remote shell
  2421.   echoes commands back when you're connected with TF's /telnet.  This
  2422.   can usually be eliminated by typing "stty -echo".
  2423.  
  2424.   See: /addtelnet, /connect, %telopt
  2425.  
  2426. @/test
  2427.  
  2428.   Usage:
  2429.  
  2430.   /TEST    <expression>
  2431.   ___________
  2432.  
  2433.   /test evaluates the expression and returns its integer value (also
  2434.   setting the special variable "%?").  A new variable scope is NOT
  2435.   created.
  2436.  
  2437.   Named variables may be accessed by simply using their name (with no
  2438.   leading '%').  This is called a variable reference.
  2439.  
  2440.   Variable substitutions of the form "{var}" and "{var-default}" (with
  2441.   no leading '%') may be used to access any variable (named or positional).
  2442.  
  2443.   Variable substitutions beginning with '%' may also be used, but are
  2444.   not recommended, as they can quickly get confusing if the /test is
  2445.   in a nested macro evaluation.  The two methods described above are
  2446.   easier to use.
  2447.  
  2448.   Before version 3.5, /test was frequently used as the condition of an
  2449.   /IF or /WHILE statement.  This is no longer needed, since /IF and
  2450.   /WHILE can now take an expression as a condition.
  2451.  
  2452.   /test can also be useful for evaluating an expression for its side
  2453.   effects, ignoring the return value.  For example, the command
  2454.   "/test kbdel(kbpoint() - 1)" will perform a backspace, and
  2455.   "/test regmatch('foo(.*)', 'foobar')" will assign "bar" to %P1.
  2456.  
  2457.   Another use for /test is to set the return value of a macro, since
  2458.   a macro's return value is that of the last command executed.  For
  2459.   example:
  2460.  
  2461.      /def isalnum =  /test {*} =/ "[a-z0-9]"
  2462.  
  2463.   Side note: If this were written using a %-variable-substitution, like:
  2464.      /def isalnum = /test "%{*}" =/ "[a-z0-9]"
  2465.   and then /isalnum were called with a quote (") as an argument, the body
  2466.   would expand to this:
  2467.      /test """ =/ "[a-z0-9]"
  2468.   which would cause an expression error.  On the other hand, the
  2469.   {}-variable-reference is not evaluated by the macro expansion,
  2470.   but by the expression itself, so it does what is expected.
  2471.  
  2472.   See: /if, /while, expressions, expansion, variables
  2473.  
  2474. @/time
  2475.  
  2476.   Usage:
  2477.  
  2478.   /TIME    [<format>]
  2479.   ___________
  2480.  
  2481.   Displays the current time.  If <format> is "@", a raw system time
  2482.   will be displayed (e.g., seconds since Jan 1, 1970).  Any other
  2483.   <format> will be used as a strftime(3) format if your system supports
  2484.   it.  If <format> is omitted, %{time_format} will be used; if
  2485.   %{time_format} is unset, a local format will be used.
  2486.  
  2487.   /time    will print nothing, and    return 0, if the formatted output
  2488.   would    be too large; otherwise, /time returns a raw system time.
  2489.  
  2490.   See the strftime(3) man page for a description of <format>.
  2491.  
  2492.   See: %time_format, %clock, idle()
  2493.  
  2494. @/toggle
  2495.  
  2496.   Usage:
  2497.  
  2498.   /TOGGLE <variable>
  2499.   ___________
  2500.  
  2501.   If <variable>    has a value of 0, its value will be set to "1".
  2502.   If <variable>    has a non-zero value, its value    will be    set to "0".
  2503.  
  2504.   See: variables
  2505.  
  2506. @tools
  2507. @/reedit
  2508. @/name
  2509. @/getline
  2510. @/xtitle
  2511. @tools.tf
  2512.  
  2513.   Usage:
  2514.  
  2515.   /REQUIRE tools.tf
  2516.   ___________
  2517.  
  2518.   /SYS <command>
  2519.   Executes a shell command, without the annoying redraw or messages of /sh.
  2520.   Only works for commands that do not require input or redraw the screen.
  2521.   Returns -1 on error, otherwise the exit status of the shell command.
  2522.  
  2523.   /REEDIT <macroname>
  2524.   Stick an existing macro definition in the input window for editing.
  2525.  
  2526.   /NAME [<name>]
  2527.   Change your character name (on a TinyMUD style mud).
  2528.  
  2529.   /GETLINE <n>
  2530.   Grab the nth line from history and stick it in the input buffer.
  2531.  
  2532.   /XTITLE <text>
  2533.   Put <text> on the titlebar of an xterm.
  2534.  
  2535.   See: /sh, /edit, /recall, tfrc
  2536.  
  2537. @/act
  2538. @/reply
  2539. @/trigpc
  2540. @/trigp
  2541. @/trigc
  2542. @/trig
  2543.  
  2544.   Usage:
  2545.  
  2546.   /TRIG    <pattern> = <body>
  2547.   /TRIGP <pri> <pattern> = <body>
  2548.   /TRIGC <chance> <pattern> = <body>
  2549.   /TRIGPC <pri>    <chance> <pattern> = <body>
  2550.   ___________
  2551.  
  2552.   Creates an unnamed macro that will trigger on <pattern> and execute
  2553.   <body>.  If <chance> is given with /trigc or /trigpc, it will be
  2554.   the percentage probability of the trigger going off; default is 100%.
  2555.   If <pri> is given with /trigp or /trigpc, it will be the priority
  2556.   of the trigger; default is 0.  The matching style of the trigger
  2557.   is determined by the global variable %{matching}.
  2558.  
  2559.   If the command does not create a new macro, it returns 0.  Otherwise,
  2560.   it returns the number of the new macro (useful in /undefn and /edit).
  2561.  
  2562.   /trig is equivalent to:  /def -t<pattern> = <body>.
  2563.   /trigp is equivalent to:  /def -p<pri> -t<pattern> = <body>.
  2564.   /trigc is equivalent to:  /def -c<chance> -t<pattern> = <body>.
  2565.   /trigpc is equivalent to:  /def -p<pri> -c<chance> -t<pattern> = <body>.
  2566.  
  2567.   See: triggers, expansion, patterns, /def, /untrig
  2568.  
  2569. @/trigger
  2570.  
  2571.   Usage:
  2572.  
  2573.   /TRIGGER <text>
  2574.   ___________
  2575.  
  2576.   Searches for and executes macros with triggers that match <text>,
  2577.   just as if <text> had come from a socket.  The return value of
  2578.   /trigger is the number of macros that were executed.
  2579.  
  2580.   See: triggers, /trig
  2581.  
  2582. @/unbind
  2583.  
  2584.   Usage:
  2585.  
  2586.   /UNBIND <sequence>
  2587.   ___________
  2588.  
  2589.   Removes a macro with the keybinding <sequence>.
  2590.  
  2591.   See: general,    /bind, /purge
  2592.  
  2593. @/undef
  2594.  
  2595.   Usage:
  2596.  
  2597.   /UNDEF <name>
  2598.   ___________
  2599.  
  2600.   Removes a macro with the name    <name>.
  2601.  
  2602.   See: macros, /def, /purge, /undefn, /undeft, /untrig, /unhook
  2603.  
  2604. @/undefn
  2605.  
  2606.   Usage:
  2607.  
  2608.   /UNDEFN <number> ...
  2609.   ___________
  2610.  
  2611.   Removes macros with the numbers specified in the arguments.  Macro
  2612.   numbers can be determined with /list, or from the return value of
  2613.   the command used to create the macro.
  2614.  
  2615.   See: macros, /def, /list, /purge, /undef
  2616.  
  2617. @/undeft
  2618.  
  2619.   Usage:
  2620.  
  2621.   /UNDEFT <trigger>
  2622.   ___________
  2623.  
  2624.   Removes a macro with a trigger associated with it that is triggered
  2625.   by the pattern <trigger>.  <trigger> is matched against existing
  2626.   triggers using simple comparison.
  2627.  
  2628.   See: macros, trigger,    /def, /purge, /undef
  2629.  
  2630. @/unhook
  2631.  
  2632.   Usage:
  2633.  
  2634.   /UNHOOK <event> [<pattern>]
  2635.   ___________
  2636.  
  2637.   Removes a macro with an associated hook on <event> <pattern>.
  2638.  
  2639.   See: hooks, /hook, /purge, /undef
  2640.  
  2641. @/untrig
  2642.  
  2643.   Usage:
  2644.  
  2645.   /UNTRIG [-a<attrs>] <trigger>
  2646.   ___________
  2647.  
  2648.   Removes a macro with an associated trigger that is triggered
  2649.   by the pattern <trigger> and has attributes <attrs>.  If -a<attrs>
  2650.   is omitted, -an is assumed.  <trigger> is matched against existing
  2651.   triggers using simple comparison.
  2652.  
  2653.   See: triggers, /trig, /purge, /undef
  2654.  
  2655. @/unworld
  2656.  
  2657.   Usage:
  2658.  
  2659.   /UNWORLD <name>
  2660.   ___________
  2661.  
  2662.   Removes a world with the name <name>.  The history for world <name>
  2663.   will be deleted, but some or all of the lines may still exist in the
  2664.   global history.
  2665.  
  2666.   See: worlds, /addworld
  2667.  
  2668. @/ver
  2669. @/version
  2670.  
  2671.   Usage:
  2672.  
  2673.   /VERSION
  2674.   /VER
  2675.   ___________
  2676.  
  2677.   /Version displays the TinyFugue version you're running and the
  2678.   operating system for which it was compiled (if known).
  2679.  
  2680.   /Ver displays an abbreviated version number.
  2681.  
  2682.   The latest version of    TF should be available for anonymous ftp
  2683.   from ftp.tcp.com in pub/mud/Clients/tf.
  2684.  
  2685.   Also see http://www.tcp.com/hawkeye/tf.html for the latest info on TF.
  2686.  
  2687.   See: /changes
  2688.  
  2689. @/watchdog
  2690.  
  2691.   Usage:
  2692.  
  2693.   /WATCHDOG [OFF|ON]
  2694.   /WATCHDOG <n1> [<n2>]
  2695.   ___________
  2696.  
  2697.   Sets the flag    %{watchdog}.  This flag    determines whether Fugue will
  2698.   watch    for identical lines and    suppress them.    Fugue looks for    lines
  2699.   which    have occurred <n1> times out of    <n2> (<n1> defaults to 2 and
  2700.   <n2> to 5) and suppress them,    so with    the default settings Fugue
  2701.   will suppress    any lines that have occurred 2 times out of the    last 5.
  2702.  
  2703.   The <n1> and <n2> settings for /watchdog are distinct    from the <n1>
  2704.   and <n2> settings for    /watchname.
  2705.  
  2706.   The flag %{watchdog} defaults    to 0 (off).
  2707.  
  2708.   See: flags, /watchname
  2709.  
  2710. @/watchname
  2711.  
  2712.   Usage:
  2713.  
  2714.   /WATCHNAME [OFF|ON]
  2715.   /WATCHNAME <n1> [<n2>]
  2716.   ___________
  2717.  
  2718.   Sets the flag    %{watchname}.  This flag determines whether Fugue will
  2719.   watch    for players displaying lots of output.    Fugue looks for    names
  2720.   which    have begun the line <n1> times out of <n2> (<n1> defaults to 4
  2721.   and <n2> to 5) and gag that person (with a message), so with the
  2722.   default settings Fugue will gag any person whose name    has begun 4 of
  2723.   the last 5 lines.
  2724.  
  2725.   The <n1> and <n2> settings for /watchname are    distinct from the <n1>
  2726.   and <n2> settings for    /watchdog.
  2727.  
  2728.   The flag %{watchname}    defaults to 0 (off).
  2729.  
  2730.   See: flags, /watchdog
  2731.  
  2732. @/while
  2733. @/do
  2734. @/done
  2735. @/while
  2736.  
  2737.   Usage:
  2738.  
  2739.   /WHILE (expr) list /DONE
  2740.   /WHILE list /DO list /DONE
  2741.   ___________
  2742.  
  2743.   The <list>s may be any list of commands.  The    return value of    a <list>
  2744.   is the return    value of the last command executed in the <list>.  Each
  2745.   <list> must be terminated by "%;".
  2746.  
  2747.   The <list> or <expr> following the /WHILE is called the condition.
  2748.   The condition is executed or evaluated, and if its result is
  2749.   non-zero, the next <list> is executed.  This sequence is repeated
  2750.   until the condition returns zero.
  2751.  
  2752.   The /BREAK command can be used within the loop to terminate the loop
  2753.   early.  The loop can also be terminated early by catching a SIGINT
  2754.   (usually generated by typing ^C).  If the variable %{max_iter} is
  2755.   non-zero, the loop will terminate automatically if the number of
  2756.   iterations reaches that number.
  2757.  
  2758.   When /WHILE is used on the command line, "%;" command separation will
  2759.   be done even if %sub=off.  Of course, full substitution will
  2760.   be done if %sub=full.
  2761.  
  2762.   Example:
  2763.  
  2764.   /def count = \
  2765.       /let i=1%; \
  2766.       /while (i <= {1}) \
  2767.       say %{i}%; \
  2768.       /let i=$[i + 1]%; \
  2769.       /done
  2770.  
  2771.   The command "/count 10" will execute the commands "say 1", "say 2", ...
  2772.   "say 10".
  2773.  
  2774.   See: expansion, /test, /break, /for
  2775.  
  2776. @/world
  2777.  
  2778.   Usage:
  2779.  
  2780.   /WORLD [-lqn] [<world>]
  2781.   /WORLD <host>    <port>
  2782.   ___________
  2783.  
  2784.   If <world> is already connected, "/world <world>" is equivalent to
  2785.   "/fg <world>", and brings <world> into the foreground.  If <world>
  2786.   is not connected, "/world <world>" is equivalent to "/connect <world>",
  2787.   and attempts to open a connection to that world.
  2788.  
  2789.   The second form is equivalent to "/connect <host> <port>".
  2790.  
  2791.   The -lqn options are the same as those for /fg and /connect.
  2792.  
  2793.   See: /connect, /fg
  2794.  
  2795. @bug
  2796. @bugs
  2797. @core
  2798. @crash
  2799. @report
  2800. @hawkeye
  2801. @author
  2802. @support
  2803. @problems
  2804.  
  2805.   If you have an old version of    TF, chances are    your bug has already been
  2806.   fixed.  The latest version of    TF should be available for anonymous ftp
  2807.   from ftp.tcp.com in pub/mud/Clients/tinyfugue.
  2808.  
  2809.   Also see http://www.tcp.com/hawkeye/tf.html for the latest info on TF.
  2810.  
  2811.   Send general bug reports, questions, etc, to hawkeye@tcp.com.  For
  2812.   problems specific to the OS/2 version, contact a.sahlbach@tu-bs.de.
  2813.   When reporting a problem or bug, please provide this information:
  2814.  
  2815.     The version of TF (type "/version" in tf).
  2816.     The operating system version (type "uname -a" in the shell).
  2817.     If tf won't compile, send the Build.log file (UNIX only).
  2818.     If you have a bug or core, give me ALL messages from tf, not just the
  2819.         last one.
  2820.     If you have a bug or core, tell me what you did or what happened
  2821.         before the problem, and if the problem is repeatable.
  2822.     If you have a core, do NOT send the core file.
  2823.  
  2824.   Usually, typing '^\' (control-backslash) will cause a core dump.
  2825.   This is not a bug.  You can disable this with /set ignore_sigquit=on,
  2826.   or by undefining the QUIT character in your shell with stty.  If TF
  2827.   cores when you receive line noise, it is probably because it
  2828.   contained '^\'.
  2829. #xterm
  2830. #scrollbar
  2831.  
  2832.   With some versions of xterm, the scrollbar does not work as expected.
  2833.   This is not a bug in tf, but a feature of xterm.  To avoid it, you
  2834.   can either remove the "ti" and "te" fields from your xterm termcap
  2835.   entry, or just set TERM=vt100.  An easy way to to this automatically
  2836.   is to add this line to your tfrc file:
  2837.  
  2838.     /if (TERM =~ "xterm") /set TERM=vt100%; /endif
  2839.  
  2840. #
  2841.   The following    bugs are known.     Don't bother reporting    them.
  2842.  
  2843.     The %{lp} and %{emulation} variables should work on a per-socket
  2844.     basis (This is partially overcome with WORLD hooks).
  2845.  
  2846.     If a shell quote (/quote !) reads a partial line from the child
  2847.     process, tf will hang until the line is completed.
  2848.  
  2849.     /recall by timestamp doesn't work when switching to/from
  2850.     daylight savings time (but /recall by age always works).
  2851.  
  2852.     TF does not currently support attributes in LP-style prompts.
  2853.     A prompt that contains attributes may cause unpredictable
  2854.     results.
  2855.  
  2856. @command line
  2857. @commandline
  2858. @startup
  2859. @invocation
  2860. @tf
  2861.  
  2862.   Syntax:
  2863.  
  2864.   tf [-f[<file>]] [-nlq] [<world>]
  2865.   tf [-f[<file>]] [-q] <host> <port>
  2866.   ___________
  2867.  
  2868.   At startup, TF will load commands from the standard macro library
  2869.   (stdlib.tf), the optinal local macro library (local.tf), and your
  2870.   personal configuration file (~/.tfrc or ~/tfrc).  Then, TF will try
  2871.   to connect to <world>, or <host> <port>.  If no world is given, TF
  2872.   will try to connect to the first world defined with /addworld in the
  2873.   configuration file(s).  If no worlds are defined, or TF can not
  2874.   connect to the specified world, TF will start up in unconnected
  2875.   mode.
  2876.  
  2877.   Options:
  2878.     -f<file>    Load <file> instead of the normal personal config file.
  2879.     -f        Do not load any    personal config file at    startup.
  2880.     -n        Do not connect to any world automatically at startup.
  2881.     -l        Disable    automatic login.
  2882.     -q        Enable quiet login.
  2883.  
  2884.   If the variable TFLIBRARY is defined in the environment, its value
  2885.   will be used as the name of a    file to    load instead of    the default
  2886.   library.
  2887.  
  2888.   See http://www.tcp.com/hawkeye/tf.html for the latest info on TF.
  2889.  
  2890.   See also:  intro, tfrc, library, worlds, /addworld
  2891.  
  2892. @redirection
  2893.  
  2894.   If TF is started with input or output redirected, %more will be ignored
  2895.   and SIGINT (^C) will kill TF without prompting.  TF will not exit when
  2896.   EOF is reached; the /quit command must be given explicitly.
  2897.  
  2898.   On UNIX systems, it is possible to write a tf script starting with the
  2899.   lines:
  2900.     #!/bin/sh
  2901.     exec tf -n <$0
  2902.   and following with any tf commands.  The file can then be executed
  2903.   directly like a shell script.
  2904.  
  2905. @tfrc
  2906. @tinytalk
  2907. @.tinytalk
  2908. @.tfrc
  2909.  
  2910.   At startup, TF attempts to load and execute commands from the
  2911.   %HOME/.tfrc or %HOME/tfrc personal config file.  This file can
  2912.   contain any commands you want executed automatically when TF starts.
  2913.  
  2914.   Some useful commands to include in your personal config file:
  2915.  
  2916.     /addworld    Define a world.  TF will autoconnect to the first world.
  2917.     /hilite    Define a hilite.
  2918.     /gag    Define a gag.
  2919.     /load    Load commands from another file.
  2920.     /require    Load a library file.
  2921.  
  2922.   For backward compatibility, TF will load ~/.tinytalk if it exists.
  2923.   This is discouraged.
  2924.  
  2925.   See:  startup, library
  2926.  
  2927. @visual
  2928. @nonvisual
  2929. @windows
  2930. @screen
  2931. @mode
  2932.  
  2933.   TinyFugue has    two main interface modes:  Visual and non-visual.
  2934.   Non-visual is    the default.  Visual mode is enabled with the
  2935.   "/visual on" command, and is highly recommended.
  2936.  
  2937.   The Visual interface has two windows:  the bottom window is for
  2938.   input, the top for output.  If your terminal can scroll in a region,
  2939.   output will scroll; otherwise if your terminal can delete and insert
  2940.   lines, TF will simulate scrolling; otherwise it will wrap from bottom
  2941.   to top, clearing two lines ahead.  The %{scroll} variable can be set
  2942.   to explicitly chose scrolling or wrapping.  The %{isize}, %{cleardone},
  2943.   and %{clearfull} variables can be used to customize the visual
  2944.   display.  See:  %isize, %cleardone, %clearfull.
  2945.  
  2946.   In the non-visual interface, input and output    are both displayed
  2947.   on the bottom    line.  If you are typing and output appears, your
  2948.   input    is cleared, the    output is displayed, and your input is
  2949.   redisplayed on the last line.     If your input has wrapped around
  2950.   to a second or third line, only the last line    will be    cleared
  2951.   and redisplayed.
  2952.  
  2953.   In both modes, output    text is    wrapped    around at a right margin
  2954.   of one less than the number of columns on your screen    (usually
  2955.   79) unless wrapping has been turned off.  In addition, if you
  2956.   set the variable %{wrapspace}, all lines after the first in a
  2957.   wrapped piece    of text    will be    indented by <n>    spaces.
  2958.   See:  %wrap, %wrapsize, %wrapspace.
  2959.  
  2960.   If the %{more} flag is on, output is suspended when the screen is
  2961.   full,    and you    can use    the TAB    key to continue.  See:  /more, /dokey.
  2962.  
  2963. @typing
  2964. @user
  2965. @interface
  2966.  
  2967.   Any input line that does not begin with '/' will be send directly to
  2968.   the foreground world, if there is one.  A line starting with more
  2969.   than one '/' will be send to the forground socket after having the
  2970.   first '/' removed.  (Exception: lines may be caught with a SEND
  2971.   hook before being sent; see "hooks").
  2972.  
  2973. #/!
  2974. #/@
  2975. #/
  2976.   Any input line beginning with    a single '/' is a TF command.  If the
  2977.   word immediately following the '/' is the name of a macro, that
  2978.   macro will be called; otherwise, the builtin command with that
  2979.   name will be called.  Several special characters between '/' and
  2980.   the name modify the behavior of the command:  '@' will call the
  2981.   named builtin command instead of the macro; and '!' will negate
  2982.   the return value of the command.
  2983. #
  2984.  
  2985.   Input    lines of the form "^old^new" will cause    TF to search backward
  2986.   in the input history for a line containing "old", replace that text
  2987.   with "new", and execute the modified command.
  2988.   See:    history
  2989.  
  2990.   Many special functions, such as backspace, can be performed by
  2991.   special keys or sequences of keys.  See "dokey" for a    complete
  2992.   list.     You can also define your own commands and bind    them to
  2993.   key sequences.  See "bind".  Any input character with the high
  2994.   bit set (normally generated by holding the "meta" key) will be
  2995.   translated to ESC plus that character with the high bit stripped.
  2996.   This allows M-x and ^[x to invoke the same ^[x keybinding.  See
  2997.   "istrip".
  2998.  
  2999.   If the %{sub}    flag is    on (it is off by default), user    input can
  3000.   undergo macro    body expansion.     The %{sub} flag also applies to text
  3001.   sent by keybindings.  See:  /sub, variables
  3002.  
  3003.   As of version 3.5 alpha 9, control characters may be input literally.
  3004.   A literal control character will be displayed in the input window in
  3005.   printable form in bold reverse.  Note that since most control keys
  3006.   are also parts of the default keybindings, it will usually be
  3007.   necessary to type ^V (/dokey LNEXT) to avoid invoking the keybinding.
  3008.  
  3009.   Newlines (^J) may be embeded in lines either by keyboard input or
  3010.   by continued lines in a /load'ed file.  When such a line is displayed,
  3011.   the line will be split at the newline, with a '\' at the end of the
  3012.   first part to show that it is continued.
  3013.  
  3014.   See also: visual, options
  3015.  
  3016. @-
  3017. @--
  3018. @options
  3019.  
  3020.   Many commands    take options to    modify their behavior, following these
  3021.   rules    (similar to UNIX conventions):
  3022.      All options must be immediately preceded by '-'.
  3023.      Options may be grouped after a single '-'.
  3024.      For options which take arguments, there must be no    space between
  3025.        the option and the argument.
  3026.      String option-arguments may be delmited by    a space, double quotes,
  3027.        single quotes, or backquotes.  A delimiter character within the
  3028.        string can be escaped by preceding it with '\'.
  3029.      All options must precede normal arguments.
  3030.      A '--' by itself may be used to mark the end of the options.  This
  3031.        is useful when the first    argument begins    with '-'.
  3032.  
  3033. @autologin
  3034. @login
  3035.  
  3036.   If the %{login} flag is on when you connect to a world, and that
  3037.   world was defined with a character, password, and optional worldtype,
  3038.   TF will attempt to automatically login to that world.  
  3039.  
  3040.   Autologin is done by a hook defined in the library.  The hook
  3041.   for the default worldtype uses TinyMUD login format; there are
  3042.   also hooks for "tiny", "lp", "lpp", and "telnet" worldtypes.
  3043.   You can also define your own LOGIN hooks.
  3044.  
  3045.   See: hooks, variables, /addworld
  3046.  
  3047. @variables
  3048. @variable
  3049.  
  3050.   Associated commands:
  3051.  
  3052.   /set        set the    value of a global variable
  3053.   /let        set the    value of a local variable
  3054.   /setenv    set the    value of an environment    variable
  3055.   /unset    unset a    variable
  3056.   /export    move an    global variable    to the environment
  3057.  
  3058.   A TinyFugue variable has a name and a    value.    Names are case
  3059.   sensitive, and should    start with a letter and    contain    only letters,
  3060.   numbers, and underscores.  A value can be any    string,    but special
  3061.   flag and numeric variables will automatically    convert    their value
  3062.   to an    integer.
  3063.  
  3064.   Variables may either be local, global, or exported.  Global variables
  3065.   are imported from the environment when tf starts, or defined with
  3066.   /set; they are visible to all tf commands.  Local variables are
  3067.   created with /let or assignment expressions, and only exist in the
  3068.   scope in which they were created.  Exported variables are global
  3069.   variables which are also visible to subshells, so they can be used by
  3070.   commands /sh, the '!' option of /quote, and file uncompression.
  3071.  
  3072.   The value of a variable can be obtained using a '%' substitution (see
  3073.   "substitution"), or by simply using its name in an expression (see
  3074.   "expressions").
  3075.  
  3076.   See "globals" for a list of special variables.
  3077.  
  3078. @flags
  3079. @globals
  3080. @environment
  3081. @special
  3082. @special variable
  3083.  
  3084.   Many options in TF can be controlled by setting special global
  3085.   variables.  Many variables have a limited number of permitted values,
  3086.   with corresponding integer values; these are called enumerated type
  3087.   variables.  All flags are enumerated type variables which can have
  3088.   the values "off" (0) or "on" (1).  Numeric variables can have any
  3089.   integer value (within the range allowed by your system).  Attempting
  3090.   to unset numeric variable or give it a string value will force its
  3091.   value to 0.
  3092.  
  3093.   The following    special    variables can be examined, but not set:
  3094.  
  3095. #%#
  3096.     #             The number    of words in a macro's argument text.
  3097.  
  3098. #%?
  3099.     ?             The return    value of the most recently executed
  3100.              command or    macro.
  3101.  
  3102. #
  3103.     1,2...         Positional parameters.  See "substitution".
  3104.     L1,L2...
  3105.     *
  3106.     R
  3107.  
  3108. #Pn
  3109.     Pn             The value of the <n>th parenthesized subexpression
  3110.              matched in the last successful regexp comparison.
  3111.              See %Pn for more details.
  3112.  
  3113. #
  3114.   The following    special    global variables can be    examined and set.
  3115.   Their    names, default values and their    special    meanings are:
  3116.  
  3117. #%MAIL
  3118.     MAIL         If    %{maildelay} is    nonzero, TF will tell you there
  3119.              is    new mail when the file named by    %{MAIL}    has
  3120.              been modified but not yet read.  If %{MAIL} is
  3121.              undefined,    TF will    try to define it as the
  3122.              file with your login name in the mail directory.
  3123.  
  3124. #%TERM
  3125.     TERM         Terminal type.  Changing the value    of %{TERM} at
  3126.              any time will cause TF to re-initialize its display
  3127.              functions to use the new value.
  3128.  
  3129. #%TFHELP
  3130.     TFHELP         The name of the help file.  The default is
  3131.              %{TFLIBDIR}/tf-help.
  3132.  
  3133. #%TFLIBDIR
  3134.     TFLIBDIR         The name of the TF library directory, which should
  3135.              contain the help file (tf-help), the standard library
  3136.              (stdlib.tf), the local library (local.tf), and
  3137.              many useful utility files.
  3138.  
  3139. #%TFLIBRARY
  3140.     TFLIBRARY         The name of the library file loaded at startup,
  3141.              usually %{TFLIBDIR}/stdlib.tf.  This can be set
  3142.              in the environment before starting tf, to load
  3143.              from an alternate library file.
  3144.  
  3145. #%always_echo
  3146.     always_echo    off  (flag) If off, tf will honor telnet DONT ECHO
  3147.              requests from the server.    If on, tf will ignore
  3148.              them and always perform local echo    (even during
  3149.              password prompts).     This can useful when using tf
  3150.              with character-mode servers (e.g., telnetd).
  3151.  
  3152. #%background
  3153.     background    on   (flag) If on, text    from background    worlds is
  3154.              processed and recorded immediately    upon receipt.
  3155.              Otherwise,    the text is ignored until the socket is
  3156.              brought into the foreground.  In either case, the
  3157.              text is not displayed until the socket is brought
  3158.              into the foreground (but see %{bg_output}).
  3159.  
  3160. #%backslash
  3161.     backslash    on   (flag) Enables use    of '\' to quote    the following
  3162.              character literally during    macro expansion.
  3163.              Generally,    this should only be turned off if you
  3164.              are having    problems with '\' in macros written
  3165.              before version 3.0.
  3166.  
  3167. #%bamf
  3168.     bamf    off  "off" (0): server "portals" are ignored.
  3169.              "on"  (1): Unter-style bamfing is enabled (disconnect).
  3170.              "old" (2): Old-style bamfing is enambed (no disconnect).
  3171.  
  3172. #%bg_output
  3173.     bg_output    on   (flag) If on, output from a background world will be
  3174.              displayed when that world is brought into the
  3175.              foreground.  If off, background output will not be
  3176.              displayed,    but it will be recorded    (so it can be
  3177.              accessed with /recall).  This flag    is ignored if
  3178.              the %{background} flag is off.
  3179.  
  3180. #%borg
  3181.     borg    on   (flag) Enables trigger bodies (attributes are
  3182.              unaffected).  (See: triggers)
  3183.  
  3184. #%clearfull
  3185.     clearfull    off  (flag) In visual mode, clear input    window rather than
  3186.              scroll when full.    Always 1 if terminal can not scroll.
  3187.  
  3188. #%cleardone
  3189.     cleardone    off  (flag) In visual mode, enables clearing of    input
  3190.              window when return    is pressed.
  3191.  
  3192. #%clock
  3193.     clock    12-hour    If set to "12-hour" or "24-hour", the current time
  3194.             will be displayed on the status bar in visual mode.
  3195.             If "off", time will not be displayed.
  3196.  
  3197. #raw
  3198. #canon
  3199. #print
  3200. #ansi
  3201. #ansi_strip
  3202. #ansi_attr
  3203. #%emulation
  3204.     emulation    ansi_attr
  3205.             Determines how speical codes sent by the server
  3206.             should be interpreted by tf.  Valid values are:
  3207.             raw:    No processing done; lines not wrapped; all
  3208.                 nonprintable characters are displayed, and
  3209.                 their effect is undefined (depending mainly
  3210.                 on your terminal).  TF's input display is
  3211.                 not guaranteed correct.  This mode allows
  3212.                 the server to have most of the control over
  3213.                 the screen, but is not guaranteed to give
  3214.                 the desired effect.  For best results,
  3215.                 %{visual} should be "off", and tf attributes
  3216.                 should not be used.
  3217.             print:    Tabs expanded; backspaces interpreted; lines
  3218.                 wrapped; nonprintable characters stripped.
  3219.             ansi_strip:  Like "print", but ansi-like codes are
  3220.                 also stripped.
  3221.             ansi_attr:  Like "ansi_strip", but ansi-like attribute
  3222.                 (color) codes will be converted to tf's
  3223.                 internal format and displayed correctly (on
  3224.                 any terminal).  Other ansi-like codes (e.g.,
  3225.                 cursor motion) will be stripped.  Recommended
  3226.                 for servers that send vt100/ansi attributes.
  3227.             debug:  converts nonprinting characters to a printable
  3228.                 form.  See also: %telopt.
  3229.             See also: %tabsize, attributes
  3230.  
  3231. #%gag
  3232.     gag        on   (flag) Enable gag attribute in triggers.  (See: /gag,
  3233.              /nogag)
  3234.  
  3235. #%gethostbyname
  3236.     gethostbyname    Set to "blocking" or "nonblocking" to determine how
  3237.              hostname resolution is done.  On OS/2, default is
  3238.              "nonblocking".  On UNIX, default is "blocking", because
  3239.              nonblocking is usually slower unless you have a fast
  3240.              machine and slow name service.
  3241.  
  3242. #%gpri
  3243.     gpri    0    Priority of subsequent /gags.  (See: /gag)
  3244.  
  3245. #%hook
  3246.     hook    on   (flag) Enable hooks.  (See: hooks,    /hook)
  3247.              Note that autologin and automatic %{lp} setting
  3248.              will not work if %{hook} is 0.
  3249.  
  3250. #%hilite
  3251.     hilite    on   (flag) Enable underline, reverse, flash, dim, hilite,
  3252.              and bold attributes in triggers.  (See: /hilite,
  3253.              /nohilite)
  3254.  
  3255. #%hiliteattr
  3256.     hiliteattr    "B"  Defines the attributes used by hilites.  Can be any
  3257.              combination of attributes,    including color    names.
  3258.              (See: attributes, /hilite)
  3259.  
  3260. #%histsize
  3261.     histsize    1000 When a new world history is created, it will have space
  3262.              for %{histsize} lines.  A world history is created the
  3263.              first time text is sent to it.  (See also: /histsize)
  3264.  
  3265. #%hpri
  3266.     hpri    0    Priority of subsequent /hilites.
  3267.  
  3268. #%insert
  3269.     insert    on   (flag) If on, keyboard input is inserted; if off,
  3270.              input overstrikes existing text.
  3271.  
  3272. #%ignore_sigquit
  3273.     ignore_sigquit
  3274.         off  (flag) If on, TF will not dump core when it
  3275.              receives a SIGQUIT (ie, CTRL-\ is typed).
  3276.  
  3277. #%isize
  3278.     isize    3    Size of input window in Visual mode.
  3279.  
  3280. #%istrip
  3281.     istrip    off  If on, the high bit will be stripped from all input
  3282.              characters.  Normally, high bits are converted to
  3283.              an ESC character, allowing M-x and ^[x to invoke
  3284.              the same keybinding.
  3285.  
  3286. #%kecho
  3287.     kecho    off  (flag) Re-echoing of keyboard input, preceeded
  3288.              by %{kprefix}.  (Interactive echo is controlled
  3289.              by %{always_echo}).
  3290.  
  3291. #%kprefix
  3292.     kprefix    ""   Prefix for    echoed keyboard    text, if %{kecho} is on.
  3293.  
  3294. #%login
  3295.     login    on   (flag) Enable automatic login hook.  (See:    hooks, /world)
  3296.  
  3297. #%lp
  3298.     lp        off  (flag) Displays partial lines as prompts, after a short
  3299.              timeout.  Useful for LP and Diku MUDs.  (See: prompts)
  3300.  
  3301. #%lpquote
  3302.     lpquote    off  (flag) If on, waits for LP    prompt for /quote and
  3303.              /repeat, instead of operating on a    timed basis.  (See:
  3304.              processes,    /quote, /repeat)
  3305.  
  3306. #%maildelay
  3307.     maildelay    60   Delay in seconds between mail checks.  Setting
  3308.              this to 0 disables    mail checking.    The file to
  3309.              be    checked    is named by the    %{MAIL}    variable.
  3310.  
  3311. #%matching
  3312.     matching    glob Determines the default pattern matching style.
  3313.              "simple" (0): straightforward string comparison.
  3314.              "glob" (1): shell-like matching (as before version 3.2).
  3315.              "regexp" (2): regular expression.
  3316.              See also: patterns, regmatch(), %Pn.
  3317.  
  3318. #%max_iter
  3319.     max_iter    1000 Maximum number of iterations in a /while loop.
  3320.              A value of    0 will allow unlimited iterations.
  3321.  
  3322. #%max_recur
  3323.     max_recur    100  Maximum depth of recursive    macro calls or triggers.
  3324.              A value of    0 will allow unlimited recursion.
  3325.  
  3326. #%mecho
  3327.     mecho    off  "off" (0): do not echo macro expansions.
  3328.              "on"  (1): echo expansions of non-invisible macros.
  3329.              "all" (2): echo expansions of all macros.
  3330.              %{mprefix} will be prepended once for each recursion
  3331.              level when macro expansion echoing is enabled.
  3332.  
  3333. #%more
  3334.     more    off  (flag) Displays output one    screenfull at a    time.
  3335.              (See: /more)
  3336.  
  3337. #%mprefix
  3338.     mprefix    "+"  Prefix for macro echoing, if %{mecho} is not "off".
  3339.  
  3340. #%oldslash
  3341.     oldslash    on   (flag) If on, sequences of    more than one '/' in a macro
  3342.              body will be compressed by    one during macro expansion.
  3343.              This allows macros    written    before version 3.0 to
  3344.              work properly.  You are encouraged to turn this off.
  3345.              (See: expansion)
  3346.  
  3347. #%prompt_sec
  3348. #%prompt_usec
  3349.     prompt_sec    0
  3350.     prompt_usec    250000
  3351.              These two variables control the delay used    to
  3352.              recognize unterminated prompts.  (See: prompts).
  3353.  
  3354. #%proxy_host
  3355. #%proxy_port
  3356.     proxy_host         These two variables describe the proxy server used
  3357.     proxy_port  23   for worlds defined with /addworld -p.  (See: proxy).
  3358.  
  3359. #%ptime
  3360.     ptime    1    Default delay (in seconds)    between    /quote and /repeat
  3361.              process runs.
  3362.  
  3363. #%qecho
  3364.     qecho    off  (flag) Echoing of /quote text, prefixed by %{qprefix}.
  3365.  
  3366. #%qprefix
  3367.     qprefix    ""   Prefix for    /quote echoing,    if %{qecho} is on.
  3368.  
  3369. #%quiet
  3370.     quiet    off  (flag) Gag text after login until the mud sends
  3371.              "Use the WHO command", "### end of messages ###", or
  3372.              25 lines.  Note:  This will not function correctly
  3373.              on MUDs which don't send those strings or 25 lines
  3374.              in the introductory text.
  3375.  
  3376. #%quitdone
  3377.     quitdone    off  (flag) Quit upon disconnection from last socket.
  3378.  
  3379. #%redef
  3380.     redef    off  (flag) Allows redefinition    of existing worlds,
  3381.              keybindings, and named macros.
  3382.  
  3383. #%refreshtime
  3384.     refreshtime    250000
  3385.              In    non-visual mode, refreshtime is    the delay (in
  3386.              microseconds) for redisplaying your keyboard input
  3387.              after it is overwritten by    incoming text.    If you
  3388.              you are on    a slow modem, you may wish to increase
  3389.              this delay.  The default is 250000    microseconds
  3390.              (1/4 second).
  3391.  
  3392. #%scroll
  3393.     scroll    on   (flag) In visual mode, scroll output instead of
  3394.              wrapping from bottom to top.
  3395.  
  3396. #%shpause
  3397.     shpause    off  (flag) Wait for a keypress    after returning    from /sh.
  3398.  
  3399. #%snarf
  3400.     snarf    off  (flag) Don't send empty lines to the server.
  3401.  
  3402. #%sockmload
  3403.     sockmload    off  (flag) Load macro files when foregrounding a world
  3404.              ("/dokey socketf", "/dokey socketb", or "/fg").
  3405.              Normally, a world's macro file is loaded only when
  3406.              TF first connects to it.  (Note: the WORLD hook is
  3407.              more useful than sockmload).
  3408.  
  3409. #tab
  3410. #tabs
  3411. #tabsize
  3412.     tabsize    8    Tabs will be replaced with spaces to pad to a
  3413.              multiple of %{tabsize}.
  3414.  
  3415. #%telopt
  3416.     telopt    off  (flag) Display telnet option negotiations (for
  3417.              debugging purposes).  See also: %emulation=debug.
  3418.  
  3419. #%sub
  3420.     sub        off  "off"  (0): input is not expanded.
  3421.              "on"   (1): input "%;" is expanded to newlines.
  3422.              "full" (2): input undergoes full macro expansion.
  3423.  
  3424. #%time_format
  3425.     time_format    %H:%M
  3426.              The format used to display times in /recall and
  3427.              /time.  The default displays hours and minutes.  A
  3428.              format of "@" will display raw system time; any
  3429.              other format is used as a strftime() format if
  3430.              your system supports it, otherwise it is ignored,
  3431.              and a local format is used.  See the strftime(3)
  3432.              man page for the meanings of other % escapes.
  3433.  
  3434. #%visual
  3435.     visual    off  (flag) Divides the    screen into an input window and    an
  3436.              output window.  (See: general)
  3437.  
  3438. #%watchdog
  3439.     watchdog    off  (flag) Gag    repeated lines.     (See: /watchdog)
  3440.  
  3441. #%watchname
  3442.     watchname    off  (flag) Gag    overactive players.  (See: /watchname)
  3443.  
  3444. #%wordpunct
  3445.     wordpunct    -_   List of punctuation that will be considered to be part
  3446.              of a word instead of delimiting the ends of a word,
  3447.              by kbwordleft() and kbwordright() (and therefore by
  3448.              /dokey WLEFT, WRIGHT, etc).
  3449.  
  3450. #%wrap
  3451.     wrap    on   (flag) Enable wordwrap on the screen.  TF will try
  3452.              to    break lines between words to fit them within
  3453.              %{wrapsize} columns.  %{wrap} is ignored if
  3454.              %{emulation} is "raw".
  3455.  
  3456. #%wraplog
  3457.     wraplog    off  (flag) Enable wordwrap in log files.  See also: %wrap.
  3458.  
  3459. #%wrapsize
  3460.     wrapsize    79   Lines (input and output) extending past this column
  3461.              will be split.  Default value is one less than the
  3462.              number of columns on your terminal (typically 80).
  3463.              Output is not wrapped if %{emulation} is "raw".
  3464.              See also: %wrap, %wrapspace.
  3465.  
  3466. #indent
  3467. #%wrapspace
  3468.     wrapspace    0    Wrapped text is indented by this many spaces.
  3469.              See also: %wrap, %wrapsize.
  3470.  
  3471. #
  3472.   The builtin commands /gag, /hilite, /hook, /nogag, /nohilite,
  3473.   /watchdog, and /watchname set the corresponding variables, and also
  3474.   perform additional functions.
  3475.  
  3476.   The standard library also defines /background, /bamf, /borg,
  3477.   /clearfull, /cleardone, /gpri, /hpri, /insert, /isize, /login, /lp,
  3478.   /lpquote, /kecho, /mecho, /more, /ptime, /qecho, /quiet, /quitdone,
  3479.   /redef, /shpause, /sockmload, /sub, /visual and /wrapspace macros to
  3480.   set the values of the corresponding variables.
  3481.  
  3482.   Note:     The variables 'L' and 'R' are reserved (see: variables).  You
  3483.   should not assign values to them.
  3484.  
  3485. @worlds
  3486.  
  3487.   Associated commands:
  3488.  
  3489.   /addworld        define a new world
  3490.   /world        connect    to a defined world
  3491.   /dc            disconnect from a world
  3492.   /unworld        undefine a world
  3493.   /purgeworld        undefine a group of worlds
  3494.   /saveworld        save world definitions to a file
  3495.   /listworlds        load world definitions from a file
  3496.  
  3497.   Fugue    stores a list of "worlds" that it knows    about.    Each world has
  3498.   six fields associated    with it:
  3499.  
  3500.     A name (which is simply a label for    the world)
  3501.     A type (optional)
  3502.     A character    name (optional)
  3503.     A character    password (optional)
  3504.     A host address
  3505.     A host port
  3506.     A macro file (optional).
  3507.  
  3508.   The character    name, password, and type are used by automatic login,
  3509.   if the %{login} flag is on.
  3510.  
  3511.   The macro file is loaded when    a socket is opened to the world.
  3512.   It can contain any commands you want executed    automatically when
  3513.   you connect to that world.  If the flag %{sockmload} is on, this
  3514.   file will also be loaded whenever you    switch to a world with the
  3515.   SOCKETB and SOCKETF keys (see    sockets, /dokey, hooks (CONNECT)).
  3516.  
  3517.   Fugue    also keeps track of a world named "default", which is just
  3518.   a dummy world    with a character name and password, and    optionally
  3519.   a macro file.     If a default world is defined,    worlds without
  3520.   character, password, or file fields will use the values from the
  3521.   default world.
  3522.  
  3523. #$world_name
  3524. #$world_character
  3525. #$world_password
  3526. #$world_host
  3527. #$world_port
  3528. #$world_mfile
  3529. #$world_type
  3530. #fields
  3531.   World    strings    can be accessed    with macro substitutions.  The following
  3532.   macro    names will expand to the fields    associated with    the current world
  3533.   (not necessarily the same as the foreground world; see /help sockets):
  3534.  
  3535.     world_name
  3536.     world_character
  3537.     world_password
  3538.     world_host
  3539.     world_port
  3540.     world_mfile
  3541.     world_type
  3542.  
  3543.   Example:
  3544.  
  3545.   /eval say I am ${world_character} on ${world_name}.
  3546.  
  3547.   This would tell the rest of the world    some stuff they    probably don't
  3548.   care about, namely the label your Fugue has assigned to the current
  3549.   world    and the    character name under which it logged on.
  3550.  
  3551.   See also:  sockets
  3552.  
  3553. #
  3554. @sockets
  3555.  
  3556.   Associated commands:
  3557.  
  3558.   /connect    open a socket connection to a world
  3559.   /dc        close (disconnect) a socket
  3560.   /login    enable automatic login
  3561.   /listsockets    display    a list of open sockets
  3562.   idle()    idle time
  3563.  
  3564.   A socket is an open connection to a world.  TF can have multiple
  3565.   sockets open simultaneously.  Only one of these can be displayed at a
  3566.   time; this is called the foreground socket.  In visual mode, the name
  3567.   of the world on the foreground socket is displayed on the status
  3568.   line.  Other sockets are in the background.  Text from any socket is
  3569.   triggered and stored in history immediately, but is not displayed
  3570.   until that socket is brought into the foreground.  Turning off the
  3571.   %{background} flag prevents all processing until the socket it
  3572.   foregrounded.
  3573.  
  3574.   The current socket is the socket to which commands are sent.  The
  3575.   current socket is almost always the same as the foreground socket,
  3576.   except:  1) when a trigger is called from any socket, that socket
  3577.   becomes the current socket for the duration of the trigger execution;
  3578.   2) when a /repeat or /quote with world redirection runs (-w option),
  3579.   that world's socket becomes the current socket for the duration of
  3580.   the process execution.
  3581.  
  3582.   Text from a socket goes through a number of checks before being
  3583.   displayed.  If the text matches any trigger patterns, a trigger may
  3584.   be executed (see "triggers").  At the same time, TF checks to see if
  3585.   the text has been gagged or hilited.  If the text was not gagged, TF
  3586.   also checks to see if it should be suppressed because of /quiet,
  3587.   /watchdog or /watchname.  Finally, the text is added to the world's
  3588.   history and queued for display.
  3589.  
  3590.   You can open a new socket in one of three ways:
  3591.  
  3592.   1. By    specifying the world name or address on    the command line.
  3593.   2. By    using the /world command.
  3594.   3. By    "bamfing" through a portal between muds    (see "bamf").
  3595.  
  3596.   /world with no arguments connects you    to the first defined world.
  3597.   Attempting to    connect    to a world to which you    are already connected
  3598.   switches you to the existing socket, rather than opening a second
  3599.   socket.
  3600.  
  3601.   You can switch between sockets with the next socket and previous
  3602.   socket keys, which default to    ESC B and ESC F, and can be modified
  3603.   with /bind.
  3604.  
  3605.   If the %{quitdone} flag is on, and you disconnect from all worlds
  3606.   (either with /dc or because the other    end of the socket closes),
  3607.   Fugue    will exit.
  3608.  
  3609.   If the %{sockmload} flag is on, a world's macro file will be loaded
  3610.   when you switch to the socket    for that world (either with the
  3611.   next and previous socket keys    or with    the /world command)
  3612.  
  3613.   If %{proxy_host} is defined, all connections will go through a
  3614.   proxy server.  See:  proxy.
  3615.  
  3616.   See also:  worlds
  3617.  
  3618. @patterns
  3619.  
  3620.   Patterns are used in triggers, hooks, /purge, /list, and /recall.
  3621.   There are three styles of pattern matching available:  "simple"
  3622.   comparison, "glob" (similar to shell filename patterns), and "regexp"
  3623.   (regular expressions).  The style used by a particular command is
  3624.   determined either by the use of the -m option or the setting of the
  3625.   global variable %{matching}.
  3626.  
  3627. #comparison
  3628. #simple
  3629. #simple matching
  3630.   "simple"
  3631.  
  3632.   The pattern is compared directly to the string.  There are no
  3633.   special characters.  Case is significant.
  3634.  
  3635. #smatch
  3636. #globbing
  3637. #glob
  3638.   "glob"
  3639.  
  3640.   Globbing is the default matching style, and was the only style
  3641.   available before version 3.2.  It is similar to filename
  3642.   expansion ("globbing") used by many shells (but is only used
  3643.   for comparison, not expansion).
  3644.  
  3645.   There    are four special sequences that can be used in tf globbing:
  3646.  
  3647.   A. The '*' character matches any number of characters.
  3648.  
  3649.   B. The '?' character matches any one character.
  3650.  
  3651.   C. Square brackets ([...]) can be used to match any one of a sequence
  3652.      of    characters.  Ranges can    be specified by    giving the first and
  3653.      last characters with a '-'    between    them.  If '^' is the first
  3654.      character,    the sequence will match any character NOT specified.
  3655.  
  3656.   D. Curly braces ({...}) can be used to match any one of a list of
  3657.      words.  Different words can be matched by listing each within the
  3658.      braces, separated by a '|' (or) character.  Both ends of {...}
  3659.      will only match a space or end of string.  Therefore "{foo}*" and
  3660.      "{foo}p" do not match "foop", and "*{foo}" and "p{foo}" do not
  3661.      match "pfoo".
  3662.  
  3663.      Patterns containing "{...}" can easily be meaningless.  A valid
  3664.      {...} pattern must: (a) contain no spaces, (b) follow a wildcard,
  3665.      space, or beginning of string, (c) be followed by a wildcard,
  3666.      space, or  end of string.
  3667.  
  3668.      The pattern "{}" will match the empty string.
  3669.  
  3670.   E. Any other character will match itself, ignoring case.  A special
  3671.      character can be made to match itself by preceeding it with '\'
  3672.      to remove its special meaning.
  3673.  
  3674.   Examples:
  3675.   "d*g"    matches    "dg", "dog", "drug", "debug", "dead slug", etc.
  3676.   "d?g"    matches    "dog", "dig" and "dug" but not "dg" or "drug".
  3677.   "M[rs]." matches "Mr." and "Ms."
  3678.   "M[a-z]" matches "Ma", "Mb", "Mc", etc.
  3679.   "[^a-z]" matches anything but    an alphabetical    character.
  3680.   "{storm|chup*}*" matches "chupchup fehs" and "Storm jiggles".
  3681.   "{storm|chup*}*" does    NOT match "stormette jiggles".
  3682.  
  3683. #re
  3684. #regex
  3685. #regexp
  3686. #regular expressions
  3687.   "regexp"
  3688.  
  3689.   The regexp package was written by Henry Spencer, and is similar to
  3690.   those used in egrep and many text editors.  See also: regmatch(),
  3691.   substitution.  The following excerpt is taken from Henry Spencer's
  3692.   regexp(3) man page.
  3693.  
  3694.      REGULAR EXPRESSION SYNTAX
  3695.           A regular expression is zero or more branches, separated by
  3696.           `|'.  It matches anything that matches one of the branches.
  3697.  
  3698.           A branch is zero or more pieces, concatenated.  It matches a
  3699.           match for the first, followed by a match for the second,
  3700.           etc.
  3701.  
  3702.           A piece is an atom possibly followed by `*', `+', or `?'.
  3703.           An atom followed by `*' matches a sequence of 0 or more
  3704.           matches of the atom.  An atom followed by `+' matches a
  3705.           sequence of 1 or more matches of the atom.  An atom followed
  3706.           by `?' matches a match of the atom, or the null string.
  3707.  
  3708.           An atom is a regular expression in parentheses (matching a
  3709.           match for the regular expression), a range (see below), `.'
  3710.           (matching any single character), `^' (matching the null
  3711.           string at the beginning of the input string), `$' (matching
  3712.           the null string at the end of the input string), a `\'
  3713.           followed by a single character (matching that character), or
  3714.           a single character with no other significance (matching that
  3715.           character).
  3716.  
  3717.           A range is a sequence of characters enclosed in `[]'.  It
  3718.           normally matches any single character from the sequence.  If
  3719.           the sequence begins with `^', it matches any single
  3720.           character not from the rest of the sequence.  If two
  3721.           characters in the sequence are separated by `-', this is
  3722.           shorthand for the full list of ASCII characters between them
  3723.           (e.g. `[0-9]' matches any decimal digit).  To include a
  3724.           literal `]' in the sequence, make it the first character
  3725.           (following a possible `^').  To include a literal `-', make
  3726.           it the first or last character.
  3727.  
  3728.      AMBIGUITY
  3729.           If a regular expression could match two different parts of
  3730.           the input string, it will match the one which begins
  3731.           earliest.  If both begin in the same place    but match
  3732.           different lengths, or match the same length in different
  3733.           ways, life gets messier, as follows.
  3734.  
  3735.           In general, the possibilities in a list of branches are
  3736.           considered in left-to-right order, the possibilities for
  3737.           `*', `+', and `?' are considered longest-first, nested
  3738.           constructs are considered from the outermost in, and
  3739.           concatenated constructs are considered leftmost-first.  The
  3740.           match that will be chosen is the one that uses the earliest
  3741.           possibility in the first choice that has to be made.  If
  3742.           there is more than one choice, the next will be made in the
  3743.           same manner (earliest possibility) subject to the decision
  3744.           on the first choice.  And so forth.
  3745.  
  3746.           For example, `(ab|a)b*c' could match `abc' in one of two
  3747.           ways.  The first choice is between `ab' and `a'; since `ab'
  3748.           is earlier, and does lead to a successful overall match, it
  3749.           is chosen.  Since the `b' is already spoken for, the `b*'
  3750.           must match its last possibility-the empty string-since it
  3751.           must respect the earlier choice.
  3752.  
  3753.           In the particular case where no `|'s are present and there
  3754.           is only one `*', `+', or `?', the net effect is that the
  3755.           longest possible match will be chosen.  So `ab*', presented
  3756.           with `xabbbby', will match `abbbb'.  Note that if `ab*' is
  3757.           tried against `xabyabbbz', it will match `ab' just after
  3758.           `x', due to the begins-earliest rule.  (In effect, the
  3759.           decision on where to start the match is the first choice to
  3760.           be made, hence subsequent choices must respect it even if
  3761.           this leads them to less-preferred alternatives.)
  3762.  
  3763.   Comparison of glob and regexps.
  3764.  
  3765.     regexp            equivalent glob (except for case sensitivity)
  3766.     ------            ---------------
  3767.     "foo"            "*foo*"
  3768.     "^bar$"            "bar"
  3769.     "(^| )baz( |$)"        "*{baz}*"
  3770.     "^(You|Hawkeye) "    "{You|Hawkeye} *"
  3771.     "foo.*bar"        "*foo*bar*"
  3772.     "f(oo|00)d"        "*{*food*|*f00d*}*"
  3773.     "line[0-9]"        "*line[0-9]*
  3774.     "^[^ ]+ whispers,"    "{*} whispers,*"
  3775.     "foo(AB|XY)?bar"    "*{*foobar*|*fooABbar*|*fooXYbar*}*"
  3776.     "zoo+m"            none
  3777.     "foo ?bar"        none
  3778.     "(foo bar|frodo)"    none
  3779.  
  3780. @macros
  3781.  
  3782.   Associated commands:
  3783.  
  3784.   /def        define a named macro, with any fields
  3785.   /trig        define a trigger macro
  3786.   /hilite    define a hilite    macro
  3787.   /gag        define a gag macro
  3788.   /bind        define a keybinding macro
  3789.   /hook        define a hook macro
  3790.   /undef    undefine a named macro
  3791.   /unhook    undefine a hook    macro
  3792.   /unbind    undefine a keybinding macro
  3793.   /undefn    undefine a macro by number
  3794.   /undeft    undefine a macro by trigger
  3795.   /purge    undefine a set of macros
  3796.   /list        display    a list of macros
  3797.   /load        load commands from a file
  3798.   /save        save macro definitions to a file
  3799.  
  3800.   The simplest kind of macro has a name    and a body.  The body is
  3801.   a list of one    or more    commands, separated by '%;' tokens.  These
  3802.   commands are executed    when the macro is called.  For example,    if
  3803.   you define a macro like
  3804.  
  3805.     /def time_warp = :jumps to the left!%;:steps to the    right!
  3806.  
  3807.   and call it by typing
  3808.  
  3809.     /time_warp
  3810.  
  3811.   you will execute the commands
  3812.  
  3813.     :jumps to the left!
  3814.     :steps to the right!
  3815.  
  3816.   A macro name is the way of calling it    from the command line or from
  3817.   another macro.  You can execute a macro by typing '/'    followed
  3818.   by the name of the macro.  If    a macro    and builtin have the same
  3819.   name,    the macro will be called.  Typing '/@' followed    by the name
  3820.   will always call the builtin command.
  3821.  
  3822.   A macro body,    or execution text, is the commands and/or text executed
  3823.   when the macro is called.  This text is evaluated according to the
  3824.   rules    described under    "expansion".
  3825.  
  3826.   Macros actually have many more fields, described below.  All fields
  3827.   (including name and body) are optional.
  3828.  
  3829.     name    The name of the    macro.    Names should begin with    a letter,
  3830.         and contain letters, numbers, or '_' characters.
  3831.  
  3832.     body    One or more commands to    be executed when macro is called.
  3833.  
  3834.     number    All macros are automatically numbered sequentially.
  3835.         This field can not be changed.
  3836.  
  3837.     trigger    when text matches the trigger pattern, the macro may
  3838.         be called.
  3839.  
  3840.     hook    the macro can be called    when a TF hook event occurs.
  3841.  
  3842.     keybinding    the macro will be called when its keybinding is    typed.
  3843.  
  3844.     shots    the macro will be deleted after    it is triggered    or hooked
  3845.         a certain number of times.
  3846.  
  3847.     priority    when multiple triggers match the same text, the    one with
  3848.         the highest priority is    selected (see "priority").
  3849.  
  3850.     fall-thru    on a trigger or    hook, allows additional    macros of lower
  3851.         priority to be run (see    "priority").
  3852.  
  3853.     world    the macro can only be triggered/hooked by text/events
  3854.         from a particular world.
  3855.  
  3856.     worldtype    the macro can only be triggered/hooked by text/events
  3857.         from a particular type of world.
  3858.  
  3859.     attributes    bold, underline, etc. for displaying trigger text.
  3860.  
  3861.     probability      when triggered, the macro has    a certain probability of
  3862.           being    executed.
  3863.  
  3864.     invisibility  prevents handling of macro by    /list, /save, or /purge.
  3865.  
  3866.   Macros may be    called in four ways:
  3867.  
  3868.   1) a command of the form "/name"
  3869.   2) triggered by text from a socket (see "triggers")
  3870.   3) hooked by a tinyfugue event (see "hooks")
  3871.   4) by    keybindings
  3872.  
  3873.   See also:  triggers, gags, hilites, hooks
  3874.  
  3875. @triggers
  3876.  
  3877.   Associated commands:
  3878.  
  3879.   /def        define a macro with any    fields
  3880.   /trig        define a trigger macro
  3881.   /trigp    define a trigger macro with priority
  3882.   /trigc    define a trigger macro with probability
  3883.   /trigpc    define a trigger macro with probability    and priority
  3884.   /gag        define a trigger macro to gag text
  3885.   /hilite    define a trigger macro to hilite text
  3886.   /trigger    call a trigger macro manually
  3887.  
  3888.   Triggers are a method    of calling a macro based on incoming text.
  3889.   When a line of text from a socket matches the    trigger    pattern    of
  3890.   a macro, that    macro becomes a    candidate for automatic    execution.
  3891.  
  3892.   If multiple macros have triggers which match the same    text, one
  3893.   or more are chosen for execution as described    under "priority".
  3894.  
  3895.   The line which triggers a macro is given to the macro as arguments,
  3896.   as if it had been called with ``/<macroname> <text>''.  Positional
  3897.   parameters refer the the corresponding word in the triggering text
  3898.   (see also: %n).  If the trigger is a regexp, subexpression parameters
  3899.   refer to the text matched by the corresponding parenthesised
  3900.   subexpression (see also: %Pn).
  3901.  
  3902.   If the selected macro(s) have    display    attributes, the    attributes are
  3903.   used to display the text which triggered the macro.
  3904.  
  3905.   If a macro has the world field set, it can only be triggered by
  3906.   text from that world.
  3907.  
  3908.   If a macro has a probability less than 100%, it might    not be
  3909.   executed even    if it is triggered.
  3910.  
  3911.   Triggers can be disabled by turning the %{borg} flag off.
  3912.  
  3913.   If the %{background} flag is turned off, text    from background
  3914.   sockets will not cause triggering until that socket is brought
  3915.   into the foreground.
  3916.  
  3917.   Triggers can also be set off manually    with the command /trigger.
  3918.  
  3919.   The /def command is the only way to specify a    multi-shot trigger.  All
  3920.   other    commands which define triggers will create permanent triggers.
  3921.  
  3922.   See also:  patterns, macros, gags, hilites, hooks, priority
  3923.  
  3924. @firewall
  3925. @proxy
  3926. @proxy server
  3927.  
  3928.   If %{proxy_host} is defined, all connections will go through a proxy
  3929.   server (firewall).  The actual connection is made to %proxy_host and
  3930.   %proxy_port.  When the connection completes, a CONNECT hook defined
  3931.   in the standard library calls /proxy_command, which is defined as
  3932.   "telnet ${world_host} ${world_port}" by default.  If your proxy
  3933.   server requires a different command, you should redefine
  3934.   /proxy_command.
  3935.  
  3936.   Note that ${world_host} and ${world_port} refer to the destination
  3937.   host as defined with /addworld, not the proxy server.
  3938.  
  3939.   For example, if to reach outside hosts, your site requires you to
  3940.   first telnet to firewall.anal.com and then type "telnet <host>
  3941.   <port>", you could set it up like this:
  3942.  
  3943.     /set proxy_host=firewall.anal.com
  3944.     /addworld outside out.side.edu 4201
  3945.  
  3946.   See:  /addworld, %proxy_host, %proxy_port
  3947.  
  3948. @hooks
  3949. @hook
  3950.  
  3951.   Associated commands:
  3952.  
  3953.   /def        define a macro with any    fields
  3954.   /hook        define a hook macro
  3955.   /unhook    undefine a hook    macro
  3956.  
  3957.   Hooks    are a method of    calling    a macro    based on special events
  3958.   within TF, in    much the same way as triggers call macros based    on
  3959.   socket text.    Hooks allow the    user to    customize the behavior of
  3960.   TinyFugue and    automate special functions.
  3961.  
  3962.   A hook definition has    two parts:  an <event> and a <pattern>.
  3963.   When the event occurs, the macro will    be executed if the arguments
  3964.   supplied by the event    match the macro's <pattern> (see the section
  3965.   on "patterns").
  3966.  
  3967.   If multiple hooks match the same event and pattern, one or more are
  3968.   selected as described    under "priority".
  3969.  
  3970.   Most hooks have a default message associated with them, which    will be
  3971.   displayed with the attributes    of the hook if one is defined.    Thus a
  3972.   hook with a gag attribute will suppress the display of the message.
  3973.  
  3974.   Hook may be have multi-shots,    in which case it and the macro it is
  3975.   associated with is removed after executing a specified number    of
  3976.   times.
  3977.  
  3978.     Event Name    Arguments    Default Message or Action
  3979.     ----------    ---------    -------------------------
  3980. #ACTIVITY
  3981.     ACTIVITY    world        '% Activity in world <world>'
  3982.                 (called only the first time activity
  3983.                 occurs on a given socket.)
  3984. #BACKGROUND
  3985.     BACKGROUND    world        '% Trigger in world <world>'
  3986. #BAMF
  3987.     BAMF    world        '% Bamfing to <world>'
  3988. #CONFAIL
  3989.     CONFAIL    world, reason    '% Connection to <world> failed: <reason>'
  3990. #CONFLICT
  3991.     CONFLICT    macro        '% <macro> conflicts    with builtin command.'
  3992. #CONNECT
  3993.     CONNECT    world        '% Connection to <world> established.'
  3994. #DISCONNECT
  3995.     DISCONNECT    world        '% Connection to <world> closed.'
  3996.                 (Called if you "QUIT" or socket closes,
  3997.                  but not if you use /dc.)
  3998. #KILL
  3999.     KILL    pid        (process ends)
  4000. #LOAD
  4001.     LOAD    file        '% Loading commands from file <file>'
  4002. #LOADFAIL
  4003.     LOADFAIL    file, reason    '% <file>: <reason>'
  4004. #LOG
  4005.     LOG        file        '% Logging to file <file>'
  4006. #LOGIN
  4007.     LOGIN    world,char,pass (automatic login)
  4008. #MAIL
  4009.     MAIL    file        '% You have new mail in <file>.'
  4010. #MORE
  4011.     MORE            '--More--' (reverse bold)
  4012. #PENDING
  4013.     PENDING    world        '% Hostname resolution for <world> in progress'
  4014.     PENDING    world        '% Connection to <world> in progress'
  4015. #PROCESS
  4016.     PROCESS    pid        process starts
  4017. #PROMPT
  4018.     PROMPT    text        <text> is a partial (unterminated) line
  4019.                 from the server.  If lp==1 and no more
  4020.                 text is received, <text> will be assumed
  4021.                 to be a prompt.
  4022. #REDEF
  4023.     REDEF    obj_type, name    '% Redefined <obj_type> <name>'
  4024. #SIGWINCH
  4025. #RESIZE
  4026.     RESIZE    columns, lines       (window resized)
  4027. #RESUME
  4028.     RESUME               '% Resuming TinyFugue'
  4029. #SEND
  4030.     SEND    text              (text sent to current socket)
  4031.                    (see note below (/help hooks))
  4032. #SHADOW
  4033.     SHADOW    var_name       '% Variable <var_name> overshadows global'
  4034. #SHELL
  4035.     SHELL    type, command       '% Executing    <type>:    <command>'
  4036. #SIGHUP
  4037.     SIGHUP               (SIGHUP caught; tf terminates)
  4038. #SIGTERM
  4039.     SIGTERM               (SIGTERM caught; tf terminates)
  4040. #SIGUSR1
  4041.     SIGUSR1               (SIGUSR1 caught; no effect)
  4042. #SIGUSR2
  4043.     SIGUSR2               (SIGUSR2 caught; no effect)
  4044. #WORLD
  4045.     WORLD    world           '---- World <world> ----'
  4046. #
  4047.  
  4048. Notes:
  4049.  
  4050.     The -w and -T options to /def can be used to restrict hooks
  4051.     to certain worlds or world types.
  4052.  
  4053.     The SEND hook is called whenever text would be sent to the current
  4054.     socket.  If a SEND hook matches the text that would be sent, the
  4055.     text is not sent, and the hook is executed instead (previous
  4056.     versions of TF required a gag to prevent sending of the original
  4057.     text; this is no longer true).  SEND hooks are never called from
  4058.     the /send command or from another SEND hook (to avoid an infinite
  4059.     loop).
  4060.  
  4061.     When successfully connected to a new socket, these events occur:
  4062.     1) If %{sockmload} is on and there is a file associated with the world),
  4063.     the file will be loaded (and the LOAD hook will be called);
  4064.     2) The CONNECT hook is called.
  4065.     3) If %{login} is on, and a character and password is defined, the LOGIN
  4066.     hook is called.
  4067.  
  4068.     The message for the CONNECT hook is displayed only if the connection
  4069.     was pending.  The standard library defines a default CONNECT hook
  4070.     to /fg the socket, which in turn calls the WORLD hook; define your
  4071.     own CONNECT hook if you want to override this automatic /fg.
  4072.  
  4073.     The SIGHUP, SIGTERM, SIGUSR1, and SIGUSR2 hooks are called when the
  4074.     corresponding signal is received.  For SIGHUP and SIGTERM, TF will
  4075.     terminate immediately after executing the hook; if the hook calls
  4076.     any commands with delayed effects (/repeat, /quote, /connect),
  4077.     those effects will not occur before termination.
  4078.  
  4079.   Examples:
  4080.  
  4081.     1) /hook ACTIVITY|DISCONNECT {TT|SM} = /world %1
  4082.  
  4083.     will cause TF to automatically switch to TT or SM if either
  4084.     becomes active or disconnected.
  4085.  
  4086.     2) /def -t'tiny.mush' -hSEND mush_escape = /send $(/escape \%[ %*)
  4087.  
  4088.     will catch any line sent to a world of type 'tiny.mush',
  4089.     escape all occurances of '%', '[' and '\' within that line,
  4090.     and send the new line instead of the original.  This is
  4091.     useful for avoiding unwanted interpretation of '%', '[', and
  4092.         '\' on TinyMUSH servers.
  4093.  
  4094.     3) /hook SIGHUP = /log on%; /recall /10
  4095.  
  4096.     will log the last 10 lines of output if your modem disconnects
  4097.     and kills your tf session.
  4098.  
  4099.   See also:  macros, triggers, patterns, priority, /signal
  4100.  
  4101. @priority
  4102. @priorities
  4103. @fallthru
  4104. @fall-thru
  4105. @selection
  4106.  
  4107.   When more than one macro is matched by a trigger or hooked event, the
  4108.   following rules are used to select which of the macros will be run:
  4109.  
  4110.   Macros are tested in order of decreasing priority.  Fall-thrus of a
  4111.   given priority are compared before non-fall-thrus of the same priority.
  4112.  
  4113.   Each matching fall-thru macro is executed immediately when it is
  4114.   found.  When the first matching non-fall-thru macro is found, all the
  4115.   non-fall-thrus of equal priority are collected, and the search ends.
  4116.   One of the non-fall-thrus is chosen at random and executed.
  4117.  
  4118.   So, in the simple case when there are no fall-thrus, the highet
  4119.   priority match is chosen.  If there is more than one of the highest
  4120.   priority, one of those is chosen at random.
  4121.  
  4122.   Fall-thru macros are defined with /def -F.
  4123.  
  4124.   See:    triggers, hooks, macros, /def
  4125.  
  4126. @hilites
  4127. @gags
  4128. @underline
  4129. @reverse
  4130. @flash
  4131. @dim
  4132. @bell
  4133. @bold
  4134. @attributes
  4135. @attribute
  4136.  
  4137.   Many TF commands take    an attribute argument containing one or    more of
  4138.   the letters "ngGurfdBbhC", which stand for: normal, gag, norecord,
  4139.   underline, reverse, flash, dim, Bold,    bell, hilite, and Color.  These
  4140.   attributes are used to display text associated with the command.
  4141.  
  4142.   It is also possible to apply attributes to a part of a line, using
  4143.   /partial or the -P option of /def.
  4144.  
  4145.   Norecord ("G") prevents the line from    being recorded in history
  4146.   (however, if logging is enabled, the line will be logged).
  4147.  
  4148.   Color ("C<name>") allows you to specify black, red, green, yellow,
  4149.   blue, magenta, cyan, white, 8 thru 15, bgblack, bgred, bggreen,
  4150.   bgyellow, bgblue, bgmagenta, bgcyan, or bgwhite.  "C" must be the
  4151.   last option in the attribute string, and is followed by the <name> of
  4152.   the color.  See: color.
  4153.  
  4154.   The hilite ('h') attribute is    special.  If specified,    the attributes
  4155.   listed in the    %{hiliteattr} variable will be combined    with the other
  4156.   attributes listed.  For example, the commands
  4157.       /set hiliteattr=r
  4158.       /echo -ahu foobar
  4159.   will display the word    "foobar" with reverse and underline attributes.
  4160.  
  4161.   All attributes except 'n' may be combined usefully.  (Even gags can
  4162.   be combined with other attributes:  combining 'g' and 'B', for
  4163.   example, will gag the text initially, but will display it as bold if
  4164.   is is recalled with /recall -ag.)
  4165.  
  4166.   Ansi attribute codes sent by the server will be interpreted by tf if
  4167.   %{emulation} is set to "ansi_attr".  See: %emulation.
  4168.  
  4169.   Attributes not supported by your terminal type will be ignored.
  4170.  
  4171.   TF does not currently support attributes in LP-style prompts.  A prompt
  4172.   that contains attributes may cause unpredictable results.
  4173.  
  4174. @color
  4175. @colors
  4176.  
  4177.   The color attribute ("C<name>") allows you to specify any one of:
  4178.   black, red, green, yellow, blue, magenta, cyan, white, 8 thru 15,
  4179.   bgblack, bgred, bggreen, bgyellow, bgblue, bgmagenta, bgcyan, or bgwhite.
  4180.   The first eight are defined in stdlib.tf as ANSI foreground colors.
  4181.   The bg* colors are defined in stdlib.tf as ANSI background colors.
  4182.   The numbered colors are defined in stdlib.tf to work with
  4183.   the corresponding cxterm colors.  They can all be redefined as
  4184.   described below.
  4185.  
  4186.   You can use a    defined    color in any attribute string.    For example,
  4187.   to make /hilite'd text appear    blue, you can /set hiliteattr=Cblue.
  4188.  
  4189.   On some terminals, lighter versions of ANSI colors can be produced by
  4190.   combining bold with a color; for example, light red is BCred.
  4191.  
  4192.   Note: color will not work if you are running tf under iscreen,
  4193.   since iscreen does not understand the color codes.
  4194.  
  4195.   To define your own codes (for terminals other than ANSI), you will
  4196.   need to edit the color variables.  The code to enable color <name> is
  4197.   stored in a variable called %{start_color_<name>}.  The code to turn
  4198.   it off is stored in %{end_color}.  These variables may contain carat
  4199.   notation and backslashed ascii codes in decimal, octal, or
  4200.   hexadecimal (e.g., ESC is ^[, \27, \033, or \0x1B).
  4201.  
  4202.   If %{emulation} is set to "ansi_attr", ANSI codes sent by the server
  4203.   will be interpreted by tf.  As a result, if the start_color_*
  4204.   variables have been edited to match your terminal, tf will translate
  4205.   ANSI color codes from the server into codes for your terminal.  See:
  4206.   %emulation.
  4207.  
  4208.   See: attributes
  4209.  
  4210. @syntax
  4211. @body
  4212. @macro body
  4213. @reentrance
  4214. @execution
  4215. @expansion
  4216. @evaluation
  4217.  
  4218.   A Builtin Command is any of the commands listed under    "commands".
  4219.   All builtin commands start with '/'.    All builtins have a return value,
  4220.   usually 1 for    success    or 0 for failure.
  4221.  
  4222.   A Macro Command is a user-defined command.  Macro commands also
  4223.   start    with '/'.  The return value of a macro is the return value
  4224.   of its body when executed.
  4225.  
  4226.   If a macro and builtin have the same name, e.g., "foo", the
  4227.   command "/foo" will call the macro.  You can always execute the
  4228.   builtin with the command "/@foo".
  4229.  
  4230.   A Simple Command is any command that does not    start with '/'.     The
  4231.   text of such a command is sent directly to the current world,    if there
  4232.   is one.  The return value of a simple    command    is 1 if    the text is
  4233.   successfully sent to the current world, otherwise 0.
  4234.  
  4235.   A Compound Command is    one of /IF.../ENDIF or /WHILE.../DONE.    These
  4236.   are described    under separate help sections.  Their return value is
  4237.   that of the last command executed.
  4238.  
  4239.   A List is a sequence of commands separated by    "%;" tokens.  The
  4240.   return value of a List is the    return value of    the last command
  4241.   executed in the body.     An empty List has a return value of 1.
  4242.  
  4243.   Some characters within a macro body undergo substitution.  These
  4244.   special characters are not interpreted as themselves,    but cause
  4245.   some evaluation to be    performed, and the result substituted in
  4246.   place    of these characters.  This is described    under "substitution".
  4247.  
  4248. #scope
  4249. #dynamic scope
  4250.   When an expansion begins, a new scope is created.  A local variable
  4251.   created during the expansion will be placed in this new scope.  The
  4252.   scope and all variables in it are destoyed when the expansion exits.
  4253.  
  4254.   Any variable reference will refer to the variable with that name
  4255.   in the nearest enclosing (i.e., most recently created) still existing
  4256.   scope.  This is called "dynamic scope".
  4257.  
  4258.   Lexical scope can be simulated to some extent by using variable
  4259.   substitutions with the correct number of '%'s instead of variable
  4260.   references.  (Remember, a "reference" uses the name by itself in an
  4261.   expression, like "/test foo"; a "substitution" uses '%' characters,
  4262.   like "/test %foo").
  4263.  
  4264. #
  4265.   See: commands, macros, substitution, /if, /while
  4266.  
  4267. @subs
  4268. @substitution
  4269.  
  4270. #%;
  4271. #newline
  4272. #command separator
  4273.   Command separation.
  4274.   %;
  4275.  
  4276.       Separates commands within a macro body.  Example:  ":falls
  4277.       down.%;:goes BOOM!" is sent as two separate lines.  "%\" is also
  4278.       accepted, for backward compatibility, but is discouraged.
  4279.  
  4280. #\n
  4281. #\
  4282. #ascii
  4283.   Character substitution.
  4284.   \<n>
  4285.   \<c>
  4286.  
  4287.       In the first form, the character whose ASCII code    is <n> is
  4288.       substituted.  If <n> starts with "0x", it    is interpreted as
  4289.       a    hexadecimal number; otherwise, if <n> starts with "0", it
  4290.       is interpreted as    octal; otherwise, it is    interpreted as
  4291.       decimal.    In the second form, the    character <c> is substituted.
  4292.       This is useful for escaping any special meaning <c> has.    If
  4293.       the variable %{backslash}    is off,    the second form    does not
  4294.       have this    special    interpretation.
  4295.  
  4296. #//
  4297.   Slash    compression.
  4298.   //...
  4299.  
  4300.       If %{oldslash} is on, sequences of slashes are replaced with a
  4301.       sequence of one fewer slashes.  A single slash, however, is left
  4302.       alone.  This feature remains for backward compatibility only; you
  4303.       are encouraged to turn %{oldslash} off to disable this.
  4304.  
  4305. #$[
  4306. #$[]
  4307.   Expression evaluation.
  4308.   $[expression]
  4309.  
  4310.       The <expression> is evaluated and    its value is substituted in
  4311.       its place.  See "expressions".
  4312.  
  4313. #$(
  4314. #$()
  4315. #command subs
  4316. #command substitution
  4317.   Command substitution.
  4318.   $(commands)
  4319.  
  4320.       The <commands> are executed, and their output is substituted
  4321.       in its place (much like the ` ` operator in most shells).
  4322.       If <commands> produce more than one line of output, they will
  4323.       be concatenated to form one line.
  4324.  
  4325.       Example:
  4326.     /def showdef = :quotes a macro:     $(/list %{1-@})
  4327.       could be used to display one of your macros to other mudders.
  4328.  
  4329. #$
  4330. #${
  4331. #${}
  4332. #macro subs
  4333. #macro substitution
  4334.   Macro    substitution.
  4335.   ${name}
  4336.   $name$
  4337.  
  4338.       The body of the macro <name> is substituted.  The    first form is
  4339.       preferred.  In the first form, the brackets may be omitted if
  4340.       the subsequent text could not be confused as part of the name.
  4341.  
  4342.       Example: The text    "${foo}" would be replaced with    the body
  4343.       of the macro named "foo".
  4344.  
  4345. #$$
  4346.   Dollar compression.
  4347.   $$...
  4348.  
  4349.       Sequences    of '$'s    are replaced by    a sequence of one fewer    '$'s.
  4350.       A    single '$', however, is    left alone, unless it introduces one
  4351.       of the substitutions described above.
  4352.  
  4353. #%
  4354. #%{
  4355. #%n
  4356. #%1
  4357. #%R
  4358. #%L
  4359. #%*
  4360. #variable subs
  4361. #variable substitution
  4362. #positional parameters
  4363. #arguments
  4364. #parameters
  4365. #variables and parameters
  4366.   Variable and Argument    substitution.
  4367.   %{selector}
  4368.   %{selector-default}
  4369.  
  4370.       The value of a variable or an argument to the macro is
  4371.       substituted, as determined by <selector>.  The brackets are
  4372.       recommended for clarity, but may be omitted if there is no
  4373.       default and the text following it can not be interpreted as part
  4374.       of the selector.  The selector can be any of:
  4375.  
  4376.       <name>
  4377.       The variable <name> is substituted.
  4378.  
  4379.       * or 0
  4380.       selects the entire argument line.
  4381.  
  4382.       1, 2, 3, etc.
  4383.       selects the corresponding positional parameter (word) from the
  4384.       argument text.
  4385.  
  4386.       -1, -2, -3, etc.
  4387.       selects from the argument text all words except the first,
  4388.       all except the first two, all except the first three, etc.
  4389.  
  4390.       L1, L2, etc.
  4391.       selects the last word, second-to-last word, etc.
  4392.       "L" is the same as "L1".
  4393.  
  4394.       -L1, -L2, etc.
  4395.       selects all words from the argument text except the last, all
  4396.       except the last two, etc. "-L" is the same as "-L1".
  4397.  
  4398.       Pn
  4399.       selects the text matching the <n>th parenthesized subexpression
  4400.       from the last regular expression match.  See %Pn.
  4401.  
  4402.       R
  4403.       selects a word from the argument text at random.  (see also: rand())
  4404.  
  4405.       Variable names are case sensitive; "L" and "R" selectors are not.
  4406.  
  4407.       If the selected expansion    would be empty,    and a <default>
  4408.       value is given, the default will be substituted instead.
  4409.       Thus "%{1-foofle}" is replaced with the first word if
  4410.       there is one, or "foofle"    if not.  The <default> may
  4411.       contain variable and macro substitutions.
  4412.  
  4413.       The "argument text" used for parameter substitutions depends on
  4414.       where the expansion occurs.  In a macro call, it is the arguments
  4415.       to the macro.  In a trigger call, it is the text which triggered
  4416.       the macro.  In an /eval statement, it is inherited from the
  4417.       caller.
  4418.  
  4419. #%{Pn}
  4420. #%Pn
  4421. #%P
  4422. #%subexpressions
  4423. #%regexp subexpressions
  4424.   Regexp subexpressions.
  4425.   %{Pn}
  4426.  
  4427.       This is actually a special case of variable substitution.  The
  4428.       value of the <n>th parenthesised subexpression from the most
  4429.       recent regexp match in scope is substituted.  Also, %P0 will
  4430.       expand to the string matched by the entire regexp.  The "scope"
  4431.       of a regexp match is the lifetime of the macro expansion it
  4432.       triggered, hooked, or in which it occured (i.e., with regmatch()).
  4433.  
  4434.       For example, after the text "Jabba the Hutt goes east." matches
  4435.       the regexp "^(.*) goes ([^ ]*)\.$", then the following expansions
  4436.       will be available until the macro exits:  P0 -> "Jabba the Hutt
  4437.       goes east."; P1 -> "Jabba the Hutt"; P2 -> "east".
  4438.  
  4439.       The number <n> can be anything from 0 to 9; other values will
  4440.       be silently ignored.  If there is no subexpression corresponding
  4441.       to <n>, the substitution will be ignored.  When parentheses
  4442.       are nested, <n> refers to the order of the opening parentheses.
  4443.  
  4444.       The %Pn subs will always refer to the first regexp match on the
  4445.       line, even if a partial hilite (/def -P) causes the regexp to be
  4446.       applied more than once.
  4447.  
  4448. #
  4449.   Here are a couple of simple examples.
  4450.  
  4451.   Definition: /def advice = whisper %1 = Let the wookie    win.
  4452.   Command:    /advice R2D2
  4453.   Sends:      whisper R2D2 = Let the wookie win.
  4454.  
  4455.   Definition: /set ending=meister
  4456.   Definition: /def greet = :waves to %{1-Jack}%{ending}.
  4457.   Command:    /greet
  4458.   Sends:      :waves to    Jackmeister.
  4459.   Command:    /greet Dave
  4460.   Sends:      :waves to    Davemeister.
  4461.  
  4462.   For some more complex examples, look at the files in TFLIBDIR.
  4463.  
  4464.   See: expansion, expressions
  4465.  
  4466. @logic
  4467. @math
  4468. @strings
  4469. @arithmetic
  4470. @expressions
  4471. @expression
  4472.  
  4473.   Expressions contain operators and operands.  They can be used in
  4474.   $[...] expression subs and in /test.
  4475. #operators
  4476.  
  4477.   In the following table, operators are listed in groups, from highest
  4478.   to lowest precedence.  Operators listed together have equal
  4479.   precedence.  The letters in the table below correspond to the type
  4480.   of objects acted on by the operators: i and j for integer, s and t
  4481.   for string.  All operators group left-to-right except assignment, which
  4482.   groups right-to-left.
  4483.  
  4484.      Operator     Meaning
  4485.      --------     -------
  4486.      (expr)    Parentheses, for grouping.
  4487.  
  4488.      fn(args)    Perform function <fn> on <args> (see: functions).
  4489.  
  4490.      !i        Boolean NOT (1 if i==0, otherwise 0).
  4491.      +i        Unary positive (useful for converting a string to an integer).
  4492.      -i        Unary negative.
  4493.  
  4494.      i * j    Integer multipication.
  4495.      i / j    Integer division.
  4496.  
  4497.      i + j    Integer addition.
  4498.      i - j    Integer subtraction.
  4499.  
  4500.      i =  j    Integer equality.
  4501.      i == j    Integer equality.
  4502.      i != j    Integer inequality.
  4503.      s =~ t    String equality (case sensitive).
  4504.      s !~ t    String inequality (case sensitive).
  4505.      s =/ t    String s matches glob pattern t.
  4506.      s !/ t    String s does not match glob pattern t.
  4507.      i <  j    Integer less than.
  4508.      i <= j    Integer less than or equal.
  4509.      i >  j    Integer greater than.
  4510.      i >= j    Integer greater than or equal.
  4511.  
  4512.      i & j    Boolean AND.  j will be evaluated if and only if i is true.
  4513.  
  4514.      i | j    Boolean OR.  j will be evaluated if and only if i is false.
  4515.  
  4516.      i ? x : y
  4517.      i ? : y    Conditional.  If i is nonzero, the result is the value of
  4518.         expression x; otherwise it is the value of expression y.
  4519.         If x is omitted, the value of i is used in its place.
  4520.  
  4521.      v := s    Assignment.  The identifier "v" refers to the variable
  4522.         in the nearest scope.  If not found, a new variable is
  4523.         created at the global level, as if by /set.
  4524.  
  4525.      x , y    Comma.  Expressions x and y are evaluated; the result
  4526.         is the value of y.  Only useful if x has some side effect.
  4527.  
  4528.   The comparison operators return 0 for false, nonzero for true.  The
  4529.   boolean operators stop evaluating as soon as the value of the
  4530.   expression is known ("short-circuit").  This does not affect the
  4531.   value of the expression, but is important when the second operand
  4532.   performs side effects.
  4533.  
  4534. #
  4535.  
  4536.   Operands can be any of:
  4537.     Integers.
  4538.     Time values of the form hh:mm or hh:mm:ss (will be converted to
  4539.         integer seconds, and can be used anywhere integers are required).
  4540.     Strings of characters, surrounded with quotes.
  4541.     Variable references (see below).
  4542.     Variable substitutions (see below).
  4543.     Macro substitutions.
  4544.     Command substitutions.
  4545.  
  4546.   Named variables may be accessed by simply using their name (with no
  4547.   leading '%').  This is called a variable reference.
  4548.  
  4549.   Variable substitutions of the form "{var}" and "{var-default}"
  4550.   may be used to access any variable (named or positional).  Note that
  4551.   there is no leading '%', and the '{' and '}' are required.
  4552.  
  4553.   Variable substitutions beginning with '%' may also be used, but are
  4554.   not recommended, since the multiple '%'s required in nested macros
  4555.   can quickly get confusing.  It always easier to use one of the above
  4556.   methods.
  4557.  
  4558.   All operands will be automatically converted to the type expected by
  4559.   the operator.  String to integer conversion is done by interpreting
  4560.   leading digits as an integer; e.g., "12ab" becomes 12, and "xyz"
  4561.   becomes 0.  Integer to string conversion is straightfoward.  Enumerated
  4562.   variables (i.e., special variables that allowed to have only a limited
  4563.   set of values, such as visual, which can only be "off" or "on") are
  4564.   converted to strings in a straightforward manner.  Enumerated variables
  4565.   are converted to integers by having one integer stand for each of the
  4566.   allowed values.  "Off" is always 0, "on" is always "1", etc.  This
  4567.   makes ``!visual'' and ``visual == 0'' the same as ``visual =~ "off"''.
  4568.   Other (non-enumerated) variable references are treated as strings.
  4569.  
  4570.  
  4571.   Examples:
  4572.  
  4573.   Given the variables
  4574.  
  4575.     /set X=5
  4576.     /set name=Hawkeye
  4577.     /set visual=1
  4578.  
  4579.   here are some expressions and their values:
  4580.  
  4581.     Expression           Value   Comments
  4582.     ----------           -----   --------
  4583.     3 + X * 2              13   3 + (5 * 2) = 13.
  4584.     "foo" =~ "bar"           0   "foo" is not identical to "bar".
  4585.     name =/ 'hawk*'           1   "Hawkeye" matches the pattern "hawk*".
  4586.     visual & !(X < 0)           1   visual is nonzero, AND %X is NOT negative.
  4587.     X =~ "+5"               0   X is interpreted as string "5".
  4588.     X == "+5"               1   string "+5" is converted to integer 5.
  4589.  
  4590.  
  4591.   See: functions, /test, expansion, patterns
  4592.  
  4593. @functions
  4594. @function
  4595.  
  4596.   Functions can be used in $[...] and /test expressions.  A function
  4597.   call is made with a function name, followed by a parenthesized list
  4598.   of comma-separated arguments.
  4599.  
  4600.   In the following list, arguments s and t are any string value, and i
  4601.   and j are any integer value.
  4602.  
  4603.   Function        Meaning
  4604.   --------        -------
  4605. #ascii
  4606. #ascii()
  4607.   ascii(s)        (int) ASCII code of first character of s.
  4608. #char
  4609. #char()
  4610.   char(i)        (str) character with ASCII code (i % 128).
  4611. #filename
  4612. #filename()
  4613.   filename(s)        (str) Performs filename expansion as described under
  4614.             "filenames".
  4615. #getpid
  4616. #getpid()
  4617.   getpid()        (int) Process id number of tf.
  4618. #idle
  4619. #idle()
  4620.   idle()        (int) Number of seconds since last keypress.
  4621.   idle(s)        (int) Number of seconds since last activity on the
  4622.             socket to the world named by s, or -1 on error.
  4623. #kbdel
  4624. #kbdel()
  4625.   kbdel(i)        (int) Delete from the cursor to position i in the input
  4626.             buffer.  Returns the new position.
  4627. #kbgoto
  4628. #kbgoto()
  4629.   kbgoto(i)        (int) Move the cursor to position i in the input buffer.
  4630.             Returns the new position (which may be different
  4631.             than i if i would put the cursor outside the buffer).
  4632. #kbhead
  4633. #kbhead()
  4634.   kbhead()        (str) Return the current input up to the cursor.
  4635. #kblen
  4636. #kblen()
  4637.   kblen()        (int) Length of current input line.
  4638. #kbmatch
  4639. #kbmatch()
  4640.   kbmatch()        (int) Finds one of "()[]{}" under or to the right of the
  4641.             cursor, and returns the position of its match, or
  4642.             -1 if not found.  (See also: keys)
  4643. #kbpoint
  4644. #kbpoint()
  4645.   kbpoint()        (int) Return the current position of the cursor in input.
  4646. #kbtail
  4647. #kbtail()
  4648.   kbtail()        (str) Return the current input after the cursor.
  4649. #kbwordleft
  4650. #kbwordleft()
  4651.   kbwordleft()        (int) Position of beginning of word.  (See also: wordpunct)
  4652. #kbwordright
  4653. #kbwordright()
  4654.   kbwordright()        (int) Position just past end of word.  (See also: wordpunct)
  4655. #mod
  4656. #mod()
  4657.   mod(i, j)        (int) Remainder of i divided by j.
  4658. #rand
  4659. #rand()
  4660.   rand()        (int) Random number in the range [0, system maximum].
  4661.   rand(j)        (int) Random number in the range [0, j-1].
  4662.   rand(i,j)        (int) Random number in the range [i, j].
  4663. #regmatch
  4664. #regmatch()
  4665.   regmatch(s, t)    (str) Compares string t to regexp s.  Subexpressions
  4666.             can later be extracted using the Pn variables or
  4667.             %Pn substitutions.  (See also: regexp)
  4668. #strcat
  4669. #strcat()
  4670.   strcat(...)        (str) Join strings (takes any number of string arguments).
  4671. #strchr
  4672. #strchr()
  4673.   strchr(s, t)        (int) First position within s of any character contained
  4674.             in t, or -1 if not found.  (For you C programmers,
  4675.             this is actually more like strcspn() or strpbrk()).
  4676. #strcmp
  4677. #strcmp()
  4678.   strcmp(s, t)        (int) Returns a number less than, equal to, or greater
  4679.             than 0 if s is lexicograpically less than, equal
  4680.             to, or greater than t, respectively.
  4681. #strlen
  4682. #strlen()
  4683.   strlen(s)        (int) Length of string.
  4684. #strncmp
  4685. #strncmp()
  4686.   strncmp(s, t, i)  (int) Like strcmp(), but compares only the first i
  4687.             characters of s and t.
  4688. #strrchr
  4689. #strrchr()
  4690.   strrchr(s, t)        (int) Last position within s of any character contained
  4691.             in t, or -1 if not found.
  4692. #strrep
  4693. #strrep()
  4694.   strrep(s, i)        (str) Returns a string containing i repetitions of s.
  4695. #strstr
  4696. #strstr()
  4697.   strstr(s, t)        (int) First position of t within s, or -1 if not found.
  4698. #substr
  4699. #substr()
  4700.   substr(s, i)        (str) Substring of s, starting at position i, to the end.
  4701.   substr(s, i, j)   (str) Substring of s, starting at position i, with length j.
  4702. #systype
  4703. #systype()
  4704.   systype()        (str) System type, either "unix" or "os/2".
  4705. #tolower
  4706. #tolower()
  4707.   tolower(s)        (str) Convert all characters in s to lower case.
  4708. #toupper
  4709. #toupper()
  4710.   toupper(s)        (str) Convert all characters in s to upper case.
  4711. #
  4712.  
  4713.   String positions are always counted from 0.  Therefore the first
  4714.   character of a string s is substr(s, 0, 1), and the last character
  4715.   is substr(s, strlen(s) - 1, 1) (or just substr(s, strlen(s) - 1)).
  4716.  
  4717.   Range checking is done on string positions.  Any position given
  4718.   outside the allowed range will be silently forced to the closest
  4719.   value that is in the range. 
  4720.  
  4721.   Macros and builtin commands can be called as functions.  Currently,
  4722.   a command called as ``$[command("word1 word2... wordN")]'' will be
  4723.   executed as if by ``/command word1 word2... wordN''.  This argument
  4724.   passing syntax is subject to change in future versions, so you
  4725.   shouldn't rely too heavily on passing multiple words in this way.
  4726.  
  4727.   To evaluate a function for its "side effect" only, you can call
  4728.   it from /test and ignore the return value (e.g., "/test kbdel(0)").
  4729.  
  4730.   Examples:
  4731.  
  4732.     Capitalize first letter of s:
  4733.       strcat(toupper(substr(s, 0, 1)), substr(s, 1))
  4734.  
  4735.     Convert a string <dbref> of the form "(#123PML)" to an integer:
  4736.       0 + substr(dbref, strchr(dbref, "#") + 1)
  4737.  
  4738.   See: expressions
  4739.  
  4740. @tinyprocesses
  4741. @processes
  4742. @process
  4743. @proc
  4744.  
  4745.   Associated commands:
  4746.  
  4747.   /quote
  4748.   /repeat
  4749.   /ps
  4750.   /kill
  4751.   /ptime
  4752.   /lpquote
  4753.  
  4754.   The /quote and /repeat commands in Fugue are done by setting up
  4755.   tinyprocesses -- processes that run concurrently with normal input
  4756.   and output.
  4757.  
  4758.   /ps can be used to get a listing of the currently running processes
  4759.   and their process ID's (for use with /kill).
  4760.  
  4761.   /kill    can be used to terminate a processes.
  4762.  
  4763.   Processes can be either synchronous or asynchronous.  Synchronous
  4764.   processes run immediately when they are started, and run to
  4765.   completion before any other commands are executed.  Synchronous
  4766.   processes are new in version 3.3 beta 10.
  4767.  
  4768.   Asynchronous processes are merely scheduled to be run by a /quote
  4769.   or /repeat command; the actual execution occurs at some later
  4770.   time.  They can be run based on two different criteria:
  4771.  
  4772.   1. Normally, processes run whenever a    specific number    of seconds
  4773.      has elapsed.  The delay can be specified when the process is
  4774.      started, or will default to the value of the user variable
  4775.      %{ptime}.
  4776.  
  4777.   2. If    the %{lpquote} flag is on, processes run whenever a prompt
  4778.      is received from the server, indicating that the previous
  4779.      command as completed.  Example:
  4780.  
  4781.     /lpquote on
  4782.     /quote /send !echo n; echo w; echo w; echo s
  4783.  
  4784.      will send the commands "n", "w", "w", and "s", but will wait
  4785.      to send a command until the prompt following the last command
  4786.      is seen.
  4787.  
  4788.   If an asynchronous /quote or /repeat is followed immediately by
  4789.   another command, the other command will run first, because the
  4790.   asynchronous process was only scheduled, not actually executed.
  4791.   Use a synchronous /quote or /repeat to force the process to run
  4792.   before any other commands.
  4793.  
  4794.   Bodies of /repeat undergo macro body expansion when they are executed;
  4795.   text generated by /quote does    not.
  4796.  
  4797.   See also:  utilities (/at, /tick)
  4798.  
  4799. @scrollback
  4800. @history
  4801.  
  4802.   Associated commands:
  4803.  
  4804.   /recall
  4805.   /quote
  4806.   /histsize
  4807.   ^<string1>^<string2>
  4808.   Recall previous/next keys (RECALLB/RECALLF, default ^P and ^N)
  4809.   Recall beginning/end keys (RECALLBEG/RECALLEND, default ^[< and ^[>)
  4810.   Search backward/forward keys (SEARCHB/SEARCHF, default ^[p and ^[n)
  4811.  
  4812.   TinyFugue stores lines in 4 different    types of history lists.
  4813.   Input    history    records    the last 50 commands from the keyboard,
  4814.   including the    current    line.  Each world has a    world history,
  4815.   which    stores 1000 lines of output from that world.  Local history
  4816.   stores 100 lines of output generated by TF, i.e.  anything that
  4817.   didn't come from a world.  Global history is an integrated list
  4818.   of 1000 lines    from TF    and every world.  The history sizes can    be
  4819.   changed with the /histsize command and the %{histsize} variable.
  4820.  
  4821.   /recall is used to display text from any of the history lists.
  4822.   The /quote command may be used to quote out of any history list using
  4823.   the /quote # feature.
  4824.  
  4825. #^^
  4826. #^
  4827.   Typing ^<string1>^<string2> finds the last command in the input
  4828.   history containing <string1>, replaces <string1> with <string2>, and
  4829.   executes the modified line.
  4830.  
  4831. #
  4832.   The recall keys replace the current input with a line from the input
  4833.   history list.  See /dokey for details.
  4834.  
  4835. @util
  4836. @utils
  4837. @/alias
  4838. @/at
  4839. @/complete
  4840. @completion
  4841. @/putfile
  4842. @map
  4843. @/psh
  4844. @quoter
  4845. @/rwho
  4846. @spell
  4847. @/spell_line
  4848. @space_page
  4849. @/speedwalk
  4850. @/tick
  4851. @/watch
  4852. @worldqueue
  4853. @utilities
  4854.  
  4855.   The library directory %{TFLIBDIR} contains many useful utility files
  4856.   ending in ".tf".  To use any one of them, simply /load or /require
  4857.   the file.  For example, to enable ESC-TAB completion automatically,
  4858.   just "/require completion.tf" from your tfrc file.  Some of the more
  4859.   useful files:
  4860.  
  4861.     alias.tf        /alias, etc: create commands without '/'.
  4862.     at.tf        /at:  execute commands at a specified time.
  4863.     complete.tf        Automagic word completion.
  4864.     filexfer.tf        /putfile, /getfile:  transfer files to/from a mud.
  4865.     kb-bash.tf        Keybindings similar to those in bash.
  4866.     kb-emacs.tf        Keybindings similar to those in emacs.
  4867.     kbbind.tf        Default key bindings.
  4868.     kbfunc.tf        Macros used by kbbind.tf.
  4869.     map.tf        Mapping commands (like tintin).
  4870.     psh.tf        /psh:  like /sh, but uses your favorite shell.
  4871.     quoter.tf        Various /quoting macros.
  4872.     rwho.tf        Remote WHO from a mudwho server.
  4873.     spc-page.tf        Old-style SPACE key scrolling at --More-- prompt.
  4874.     spedwalk.tf        Single character movement (like tintin).
  4875.     spell.tf        Spelling checker.
  4876.     tick.tf        Diku tick counter (like tintin).
  4877.     watch.tf        /watch: Watch for a particular player.
  4878.     world-q.tf        Keep track of active worlds.
  4879.  
  4880.   There are also other files, not listed here.
  4881.  
  4882.   For complete instructions on any of these utilities, see the help section
  4883.   for that topic if there is one, or read the comments at the top of each
  4884.   file.
  4885.  
  4886.   Note to unix users:  many library files were renamed in version 3.5,
  4887.   but the old names still work (via soft links).
  4888.  
  4889. @stdlib.tf
  4890. @local.tf
  4891. @lib
  4892. @library
  4893. @standard library
  4894.  
  4895.   When TF is started, macros are loaded from the standard macro library
  4896.   (stdlib.tf) and the optional local macro library (local.tf).  These
  4897.   macros are marked with the invisible option ("-i") so they will not
  4898.   be processed by /list, /save and /purge unless forced.  Redefining or
  4899.   undefining such a macro will clear the -i option, so customized
  4900.   macros with the same names as library macros can be created, listed,
  4901.   saved, and purged.
  4902.  
  4903.   See also: utilities
  4904.  
  4905. Filenames:
  4906.  
  4907.   These    macros may be redefined    to any filename.
  4908.   LOGFILE contains the default filename    used by    /log.
  4909.   MACROFILE, HILITEFILE, GAGFILE, TRIGFILE, BINDFILE, HOOKFILE,    and
  4910.     WORLDFILE are used by the /load* and /save*    family of commands.
  4911.  
  4912. #list*
  4913. List commands:
  4914.  
  4915.   /listdef <spec>     - equivalent to '/list    <spec>'.
  4916.   /listhilite <spec>     - lists hilites on <spec>.
  4917.   /listgag <spec>     - lists gags on <spec>.
  4918.   /listtrig <spec>     - lists triggers on <spec>.
  4919.   /listbind <spec>     - lists key bindings matching <spec>
  4920.   /listhook <spec>     - lists hooks matching    <spec>.
  4921.  
  4922.   See: /list
  4923.  
  4924. #purge*
  4925. Purge commands:
  4926.  
  4927.   /purgedef <spec>     - purges macros whose name matches <spec>
  4928.   /purgehilite <spec>     - purges macros with hilites on <spec>
  4929.   /purgegag <spec>     - purges macros with gags on <spec>
  4930.   /purgetrig <spec>     - purges macros with triggers on <spec>
  4931.   /purgedeft <spec>     - purges named    macros with triggers on    <spec>
  4932.   /purgebind <spec>     - purges key bindings matching    <spec>.
  4933.   /purgehook <spec>     - purges hooks    matching <spec>.
  4934.  
  4935.   See: /purge
  4936.  
  4937. #load*
  4938. Load commands:
  4939.  
  4940.   /loaddef, /loadhilite, /loadgag, /loadtrig, /loadbind, /loadhook,
  4941.   /loadworld.  All take    a <file> argument; if omitted, the appropriate
  4942.   default filename macro is used.
  4943.  
  4944.   See: /load
  4945.  
  4946. #save*
  4947. Save commands:
  4948.  
  4949.   /savedef, /savehilite, /savegag, /savetrig, /savebind, /savehook,
  4950.   /saveworld.  All take a <file> argument.  If <file> is omitted, the
  4951.   appropriate default filename macro is used.
  4952.  
  4953.   See: /save
  4954.  
  4955. #compression
  4956. #compress
  4957. File compression:
  4958.  
  4959.   The helpfile, personal config file, and files read    with /load may
  4960.   be stored compressed on disk.  If TF can not find a file with the
  4961.   specified name, it will add COMPRESS_SUFFIX to the filename and try
  4962.   to read it by piping it through COMPRESS_READ.  COMPRESS_READ should
  4963.   contain the name of a shell command that takes a filename as an
  4964.   argument, and prints its output on standard output.  The default
  4965.   values for COMPRESS_SUFFIX and COMPRESS_READ defined in the library
  4966.   are ".Z" and "zcat" for unix, ".zip" and "unzip -p" for os/2.
  4967.   Undefining COMPRESS_SUFFIX will disable this feature.  Note:  /save,
  4968.   /saveworld, and /log do not write compressed files.
  4969.  
  4970. #retry
  4971. World connection commands:
  4972.  
  4973.   /retry <world> [<delay>]
  4974.     Try    to connect to <world>; repeat every <delay> seconds until successful.
  4975.   /retry_off [<world>]
  4976.     Cancels "/retry <world>" (default: all worlds)
  4977.  
  4978. #hilite_whisper
  4979. #hilite whisper
  4980. #hilite_page
  4981. #hilite page
  4982. Hilite commands:
  4983.  
  4984.   /hilite_whisper, /hilite_page, /nohilite_whisper, and    /nohilite_page
  4985.   turn on or off hiliting several different page and whisper formats.
  4986.  
  4987. #
  4988. Backward compatible macros:
  4989.  
  4990.   /reply, /act,    /nolog,    /nologin, /nologme, /noquiet, and /nowrap are
  4991.   provided for compatibility.
  4992.  
  4993. @/keys
  4994.  
  4995.   Obsolete.  See /bind, /dokey, /def.
  4996.  
  4997. @lp
  4998. @diku
  4999. @prompt
  5000. @prompts
  5001.  
  5002.   If the server sends GOAHEAD or END-OF-RECORD telnet characters after
  5003.   every prompt, TF will handle prompts cleanly.  To avoid some minor
  5004.   glitches, you should leave the %{lp} flag off when connected to such
  5005.   a server.  If you are responsible for a server and wish to make it
  5006.   more TF-friendly, see "/help protocol".
  5007.  
  5008.   However, unterminated prompts are sent by most LP muds, Diku muds,
  5009.   and some other types of servers.  Normally, TF will not display such
  5010.   text until a newline is received, so you may not see the prompt until
  5011.   after you press return.  But if the %{lp} flag is on, TF will attempt
  5012.   to separate these prompts from normal text and display them
  5013.   correctly.
  5014.  
  5015.   The recommended way to use the %{lp} flag is to define your worlds
  5016.   with one of the /addlp, /adddiku, or /addtelnet commands.  The %{lp}
  5017.   flag will be turned on automatically when you switch to such a world,
  5018.   and turned off for the other predefined world types.  See: /addworld.
  5019.  
  5020.   TF also provides a PROMPT hook, which allows you to tell it what
  5021.   to look for in a prompt.  When an unterminated line is received,
  5022.   the PROMPT hook is called immediately.  If there is no match,
  5023.   TF will use the timeout method described below (if %{lp} is on).
  5024.   But if there is a matching PROMPT hook, TF will forget about the
  5025.   line and let the hook deal with it.  By combining the PROMPT hook
  5026.   with the /prompt command, you can recognize most prompts immediately
  5027.   without having to use the %{lp} timing mechanism.  The typical way
  5028.   of doing this is:
  5029.  
  5030.     /def -h"PROMPT *> " catch_prompt = /prompt %*
  5031.  
  5032.   So, whenever TF receives an unterminated line that matches "*> ",
  5033.   catch_prompt will see it, and use /prompt to copy it to the current
  5034.   prompt.
  5035.  
  5036.   If an unterminated line is not matched by any PROMPT hook, and it is
  5037.   not followed by more text within a short period of time, TF will
  5038.   assume it is a prompt.  This method is not foolproof.  If the delay
  5039.   is too short, broken lines will look like prompts, and will briefly
  5040.   appear in the input window until the rest of the line arrives, at
  5041.   which time both parts of the line will be printed as normal output.
  5042.   If the delay is too long, there will be an annoying delay before
  5043.   displaying prompts.
  5044.  
  5045.   The delay can    be varied by setting the variables prompt_sec=<seconds>
  5046.   and prompt_usec=<microseconds>.  The default values are prompt_sec=0
  5047.   and prompt_usec=250000 (that is, 0.25    seconds).
  5048.  
  5049.   Attributes in prompts are currently not supported, and may cause
  5050.   unpredictable results.
  5051.  
  5052.   See also: %login, /addworld
  5053.  
  5054. @goahead
  5055. @eor
  5056. @end-of-record
  5057. @protocol
  5058. @prompt protocol
  5059.  
  5060. TF will recognize the TELNET protocol commands GOAHEAD or END-OF-RECORD
  5061. as the end of a prompt.  If you are responsible for a server that has
  5062. prompts, and wish to make it more friendly to TF users, choose one of
  5063. these options:
  5064.  
  5065. GOAHEAD
  5066. Send IAC GA (\377 \371) after each prompt. 
  5067. This is the easier of the two options.  In many servers, this can
  5068. be done at the beginning of the routine that reads user input.
  5069. Disadvantage: could possibly cause problems in clients that don't
  5070. understand TELNET protocol (but usually, they will just pass it through
  5071. to the terminal, which will usually ignore it).
  5072.  
  5073. END-OF-RECORD
  5074. Send IAC WILL EOR (\377 \373 \031) when the user connects.  If the
  5075. client responds with IAC DO EOR, then you can send IAC END-OF-RECORD
  5076. (\377 \357) after each prompt; otherwise, do nothing special in prompts.
  5077. Disadvantage: requires extra state per descriptor and more understanding
  5078. of telnet protocol.
  5079. Advantage: minimizes potential problems for clients that do not
  5080. recognize telnet protocol.
  5081.  
  5082. For more information on TELNET protocol, see RFCs 854, 855, and 885.
  5083.  
  5084. RFCs can be obtained via FTP from NIS.NSF.NET, NISC.JVNC.NET, 
  5085. VENERA.ISI.EDU, WUARCHIVE.WUSTL.EDU, SRC.DOC.IC.AC.UK,
  5086. FTP.CONCERT.NET, DS.INTERNIC.NET, or NIC.DDN.MIL.
  5087.  
  5088. See also: prompts
  5089.  
  5090. @file
  5091. @files
  5092. @filename
  5093. @filenames
  5094. @filename expansion
  5095.  
  5096.   Certain strings are treated as filenames in tf (%{TFHELP}; %{TFLIBDIR};
  5097.   %{TFLIBRARY}; arguments to /load, /cd; etc.).  Those strings undergo
  5098.   filename expansion as described below.
  5099.  
  5100.   If <file> begins with '~', all characters after the '~' up to the
  5101.   first '/' or end of string are treated as a user name, and the '~'
  5102.   and user name are replaced with the name of the home directory of
  5103.   that user.  If the user name is empty, the current user's home
  5104.   directory is substituted (i.e., %{HOME}).
  5105.  
  5106.   For example, if bob's home directory is /users/bob, then the command
  5107.   "/load ~bob/macros.tf" will attempt to load the file /usrs/bob/macros.tf.
  5108.  
  5109.   "~user" expansion is not supported on systems that do not have the
  5110.   getpwnam() function.
  5111.  
  5112. @style
  5113. @hints
  5114.  
  5115.   Some hints and style tips:
  5116.  
  5117. > Use a    high-priority trigger on yourself to prevent loops.
  5118.   Say I    want to    throw a    tomato at anyone who says the word
  5119.   "tomato", and    I write    the following trigger:
  5120.  
  5121.   /def -t"*tomato*" tomato = :throws a tomato at %1.
  5122.  
  5123.   If Ben uses the word tomato, I will trigger, and then    see
  5124.   the text "Hawkeye throws a tomato at Ben."  That text    contains
  5125.   the word tomato, which will trigger me again,    creating an
  5126.   infinite loop.  One way to prevent this is by    creating a high-
  5127.   priority trigger on myself which does    nothing:
  5128.  
  5129.   /def -p99999 -t"{Hawkeye|You}*" anti_loop
  5130.  
  5131.   Now, when I see "Hawkeye throws a tomato at Ben", the    /anti_loop
  5132.   trigger will catch it    before /tomato does, so    I won't    loop.
  5133.  
  5134. > Use multiple lines, spacing, and indentation in /load    files.
  5135.   Normally, commands must be on    one line.  But in files    read with
  5136.   /load, if a line ends    in '\',    the following line will    have leading
  5137.   whitespace stripped and the two lines    will be    joined.     This makes
  5138.   it much easier (for humans) to read complex macros.  Compare the
  5139.   two identical    macros below, and see which is easier to read.
  5140.  
  5141.   /def count=/let i=1%;/while (i<=%1) say %i%;/let i=$[i+1]%;/done
  5142.  
  5143.   /def count = \
  5144.       /let i=1%; \
  5145.       /while ( i <= %1 ) \
  5146.       say %i%; \
  5147.       /let i=$[i + 1]%; \
  5148.       /done
  5149.  
  5150. > Use comments in /load    files.
  5151.   Complicated macros are much easier to    read if    you include a short
  5152.   comment describing the arguments to the macro    and what it does.
  5153.   Lines    beginning with ';' are comments, and are ignored during    /load.
  5154.  
  5155. > Name all triggers and    hooks.
  5156.   If you ever need to /load a file a second time, triggers, hilites,
  5157.   hooks, and gags without names    may be duplicated.  But    if they
  5158.   are named, old copies    of macros will be replaced with    new copies
  5159.   of macros with the same name.     Naming    macros also makes it easier
  5160.   to /list or otherwise    find them.
  5161.  
  5162. > Don't    use "weird" characters in macro    names.
  5163.   Although any macro name is legal, some characters can    have unwanted
  5164.   expansion effects.  Weird characters are also    harder to read.     You
  5165.   should stick to letters, numbers, and    '_' characters.     In particular,
  5166.   avoid    '~' characters,    since they are used in library macros.
  5167.  
  5168. > Use local variables instead of global    variables if possible.
  5169.   This avoids conflicts    when two macros    use a variable with the
  5170.   same name.  But remember, when you use a variable reference
  5171.   (by name, as opposed to a variable substitution using "%"), TF
  5172.   uses dynamic scoping (see: scope).
  5173.  
  5174. > Use variable references in expressions instead of %-substitutions.
  5175.   Because macro bodies are expanded, something like "/test %1" is
  5176.   prone to problems if %1 contains any special characters.  But by
  5177.   using a variable reference you can avoid this problem; for example,
  5178.   "/test {1}".
  5179.  
  5180. @/false
  5181. @/:
  5182. @/true
  5183.  
  5184.   Usage:
  5185.  
  5186.   /TRUE
  5187.   /FALSE
  5188.   ___________
  5189.  
  5190.   /True does nothing, and returns nonzero.
  5191.  
  5192.   /False does nothing, and returns zero.
  5193.  
  5194.   /: is the same as /true.
  5195.  
  5196. @/first
  5197. @/last
  5198. @/rest
  5199. @/nth
  5200.  
  5201.   Usage:
  5202.  
  5203.   /FIRST <list>
  5204.   /REST  <list>
  5205.   /LAST  <list>
  5206.   /NTH   <n> <list>
  5207.   ___________
  5208.  
  5209.   These commands echo part of a <list> of words.
  5210.   /first echoes the first word in <list>.  /rest echoes all except the first
  5211.   word of <list>.  /last echoes the last word of <list>.  /nth echoes the
  5212.   <n>th word in <list>.
  5213.  
  5214.   See: lisp
  5215.  
  5216. @/car
  5217. @/cdr
  5218. @/cadr
  5219. @/cddr
  5220. @/caddr
  5221. @/cdddr
  5222. @/length
  5223. @/reverse
  5224. @/mapcar
  5225. @/maplist
  5226. @/remove
  5227. @/unique
  5228. @lisp
  5229. @lisp.tf
  5230. @list
  5231. @list commands
  5232.  
  5233.   Usage:
  5234.  
  5235.   /REQUIRE lisp.tf
  5236.   ________
  5237.  
  5238.   These commands operate on lists of words, and are similar to those in
  5239.   lisp.  They all give their results with /echo, and are intended to
  5240.   be used in $(...) command substitutions to capture the result.
  5241.  
  5242.   /car <list>        Echo first word.  (Same as /first).
  5243.   /cdr <list>        Echo all words after first.  (Same as /rest).
  5244.   /cadr <list>        Echo second word.
  5245.   /cddr <list>        Echo all words after second.
  5246.   /caddr <list>        Echo third word.
  5247.   /cdddr <list>        Echo all words after third.
  5248.  
  5249.   /length <list>    Echo number of words in <list>.
  5250.  
  5251.   /reverse <list>    Reverse the order of the words in <list>.
  5252.  
  5253.   /mapcar <mac> <list>    Execute "/<mac> <word>" for each word in <list>.
  5254.   /maplist <mac> <list>    Execute "/<mac> <list>" repeatedly, removing the
  5255.             first word from <list> each time.
  5256.  
  5257.   /remove <word> <list>    Echo <list> with all occurances of <word> removed.
  5258.  
  5259.   /unique <list>    Remove all duplicate words from <list>.
  5260.             Note: /unique is very slow on long lists.
  5261.  
  5262.   See: /nth
  5263.  
  5264. @timer
  5265. @timing
  5266.   See:  processes, /repeat, /quote, utilities (/at, /tick), %clock, /time.
  5267. @status
  5268. @status bar
  5269. @status line
  5270.   See:  /more, %MAIL, %insert, %clock, /log, sockets
  5271. @%catch_ctrls
  5272.   See:  %emulation
  5273. @rcs
  5274.   $Id: tf-help,v 35000.1 1995/08/07 06:22:43 hawkeye Exp $
  5275. @
  5276.